<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Manjeet Singh</title>
    <description>The latest articles on DEV Community by Manjeet Singh (@codermanjeet).</description>
    <link>https://dev.to/codermanjeet</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3592638%2F87d342ce-cc92-44b7-ad41-1297ed324ebf.png</url>
      <title>DEV Community: Manjeet Singh</title>
      <link>https://dev.to/codermanjeet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codermanjeet"/>
    <language>en</language>
    <item>
      <title>Laravel AI SDK Guide 2026</title>
      <dc:creator>Manjeet Singh</dc:creator>
      <pubDate>Mon, 09 Feb 2026 13:01:06 +0000</pubDate>
      <link>https://dev.to/codermanjeet/laravel-ai-sdk-guide-2026-288a</link>
      <guid>https://dev.to/codermanjeet/laravel-ai-sdk-guide-2026-288a</guid>
      <description>&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/laravel-ai-sdk-guide-2026-fea8e0a3e0ee?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0gc5193l1se381efn6q.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hey Laravel folks! Picture this: Laracon India 2026, Ahmedabad buzzing with energy, Taylor Otwell on stage, and boom — the official…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/laravel-ai-sdk-guide-2026-fea8e0a3e0ee?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>coding</category>
      <category>php</category>
      <category>programming</category>
      <category>laravel</category>
    </item>
    <item>
      <title>My 8 Years in Dev: The Mindset and Practices That Make You a Better Developer</title>
      <dc:creator>Manjeet Singh</dc:creator>
      <pubDate>Wed, 03 Dec 2025 12:32:10 +0000</pubDate>
      <link>https://dev.to/codermanjeet/my-8-years-in-dev-the-mindset-and-practices-that-make-you-a-better-developer-116l</link>
      <guid>https://dev.to/codermanjeet/my-8-years-in-dev-the-mindset-and-practices-that-make-you-a-better-developer-116l</guid>
      <description>&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/my-8-years-in-dev-the-mindset-and-practices-that-make-you-a-better-developer-351aaee857af?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2600%2F1%2ANdJIq7EyruJGU_gbKVl_5A.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After 8 years writing code, breaking things, learning from mistakes, and building serious products, one truth stands out: being a “good…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/my-8-years-in-dev-the-mindset-and-practices-that-make-you-a-better-developer-351aaee857af?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>coding</category>
      <category>webdev</category>
      <category>softwareengineering</category>
      <category>programming</category>
    </item>
    <item>
      <title>Trait or Builder? The Complete Guide Every Laravel Developer Should Read</title>
      <dc:creator>Manjeet Singh</dc:creator>
      <pubDate>Mon, 01 Dec 2025 13:02:18 +0000</pubDate>
      <link>https://dev.to/codermanjeet/trait-or-builder-the-complete-guide-every-laravel-developer-should-read-42f4</link>
      <guid>https://dev.to/codermanjeet/trait-or-builder-the-complete-guide-every-laravel-developer-should-read-42f4</guid>
      <description>&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/trait-or-builder-the-complete-guide-every-laravel-developer-should-read-830b5779a2ec?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fv2%2Fresize%3Afit%3A1280%2F1%2AUXIIrPMKy6E8-hkZ7yUU1Q.png" alt="Trait or Builder? The Complete Guide Every Laravel Developer Should Read" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ever wondered whether you should reach for a Trait or build a Custom Eloquent Builder in your next Laravel project? You’re not alone! With Laravel pushing forward in 2025 and PHP 8.3+ powering our apps, writing maintainable, readable code is more crucial than ever. In this deep dive, I’ll break down Traits vs Builders for Laravel, tackle common developer pain points, and guide you to the best solution for real-world projects.&lt;/p&gt;

&lt;p&gt;If you want cleaner code and more expressive queries, this post is for you. Drop a comment with your experience — what’s your go-to? Let’s boost your Laravel skills together!&lt;/p&gt;

&lt;h1&gt;
  
  
  Why This Topic Matters
&lt;/h1&gt;

&lt;p&gt;Laravel developers, whether beginners or pros, are constantly balancing speed, scalability, and developer happiness. As Laravel every new version brings new features and stricter PHP standards, organizing business logic and query code is a hot topic in the community.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think about it for a second:&lt;/strong&gt; You want DRY, testable code — but maybe your models are stuffed with methods, or your query logic is scattered in Traits, controllers, or services. That’s where the Trait vs Builder debate gets real. The choices you make now can save hours (or cause headaches) later.&lt;/p&gt;

&lt;p&gt;Let’s explore, clarify, and give you concrete, actionable advice. I’m &lt;br&gt;
Coder Manjeet&lt;br&gt;
 — join me for a personal, community-driven deep dive!&lt;/p&gt;
&lt;h1&gt;
  
  
  What is a Trait in Laravel?
&lt;/h1&gt;

&lt;p&gt;A Trait is a reusable set of methods in PHP, letting you share logic between different classes. In Laravel, traits are often used to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add query scopes to models (&lt;code&gt;ActiveScope&lt;/code&gt;, &lt;code&gt;PublishedScope&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Share event logic (like model observers)&lt;/li&gt;
&lt;li&gt;Bundle helpers or utility functions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Adding a reusable scope&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;trait&lt;/span&gt; &lt;span class="nc"&gt;HasActiveScope&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;scopeActive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'active'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Model&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;HasActiveScope&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Post&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Model&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;HasActiveScope&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The beauty:&lt;/strong&gt; You can add &lt;code&gt;active()&lt;/code&gt; to any model instantly.&lt;br&gt;
&lt;strong&gt;But beware:&lt;/strong&gt; Piling on too many traits clutters your model, and logic can get messy if traits start doing more than their original job.&lt;/p&gt;
&lt;h1&gt;
  
  
  What is a Custom Eloquent Builder?
&lt;/h1&gt;

&lt;p&gt;A Custom Eloquent Builder is a class extending Laravel’s Builder, designed for powerful, expressive query logic. Want to clean up your models and centralize queries? Builder is your best friend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages include:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Separation of concerns:&lt;/strong&gt; Models stay pure; query logic lives in the builder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chaining and fluency:&lt;/strong&gt; Organize complex queries with beautiful method chains.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testability:&lt;/strong&gt; Isolated query logic makes for easier unit tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Custom Product query builder&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Models\Builders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Database\Eloquent\Builder&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ProductBuilder&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Builder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;active&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'active'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;inStock&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'stock'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// In Product model&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Product&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Model&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;newEloquentBuilder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ProductBuilder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Usage&lt;/span&gt;
&lt;span class="nv"&gt;$products&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Product&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;active&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;inStock&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Models stay clean — your query methods live together, ready to be chained anywhere.&lt;/p&gt;

&lt;h1&gt;
  
  
  Core Differences (“Trait vs Builder” for Laravel Devs)
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Trait:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Great for generic, reusable logic and simple query scopes.&lt;/li&gt;
&lt;li&gt;Can contain non-query methods (helpers, relationships, events).&lt;/li&gt;
&lt;li&gt;Easy to apply across models.&lt;/li&gt;
&lt;li&gt;Can muddy the waters if abused (model bloating, cross-dependencies).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Custom Builder:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Centralizes query logic, especially as complexity grows.&lt;/li&gt;
&lt;li&gt;Keeps models slim and efficient.&lt;/li&gt;
&lt;li&gt;Fluent, chainable, and expressive.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/trait-or-builder-the-complete-guide-every-laravel-developer-should-read-830b5779a2ec?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>webdev</category>
      <category>laravel</category>
      <category>programming</category>
    </item>
    <item>
      <title>Enums: How Laravel Devs Cut bugs by 50%</title>
      <dc:creator>Manjeet Singh</dc:creator>
      <pubDate>Thu, 09 Oct 2025 13:31:58 +0000</pubDate>
      <link>https://dev.to/codermanjeet/enums-how-laravel-devs-cut-bugs-by-50-4mod</link>
      <guid>https://dev.to/codermanjeet/enums-how-laravel-devs-cut-bugs-by-50-4mod</guid>
      <description>&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/enums-how-laravel-devs-cut-bugs-by-50-d1c4af86929a?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mjjtgs7ghz1jt5k0zay.png" alt="Enums: How Laravel Devs Cut bugs by 50%" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You are building your Laravel app with Inertia.js, everything works perfectly until you try to update a record with a file upload. Text fields update fine, but files mysteriously vanish into thin air. Sound familiar?&lt;/p&gt;

&lt;p&gt;This is one of the most frustrating bugs Laravel developers face when working with &lt;code&gt;Inertia.js&lt;/code&gt;. The good news is that you are not alone and there are proven solutions. Let me walk you through the 5 most common issues with &lt;code&gt;PUT&lt;/code&gt; and &lt;code&gt;PATCH&lt;/code&gt; file uploads and exactly how to tackle each one.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Root Cause Behind the Mystery
&lt;/h1&gt;

&lt;p&gt;Before diving into solutions, you need to understand why this happens. PHP and many server-side frameworks do not natively process &lt;code&gt;multipart/form-data&lt;/code&gt; requests for &lt;code&gt;PUT&lt;/code&gt;, &lt;code&gt;PATCH&lt;/code&gt;, or &lt;code&gt;DELETE&lt;/code&gt; methods. This limitation exists at the PHP core level, not in Laravel or Inertia itself.&lt;/p&gt;

&lt;p&gt;When you send a file using &lt;code&gt;PUT&lt;/code&gt; or &lt;code&gt;PATCH&lt;/code&gt;, PHP simply cannot parse the incoming &lt;code&gt;FormData&lt;/code&gt; object the same way it does for &lt;code&gt;POST&lt;/code&gt; requests. The data arrives at your server but remains unparsed in the raw input stream.&lt;/p&gt;

&lt;h2&gt;
  
  
  Issue 1: Files Not Received in Laravel Controller
&lt;/h2&gt;

&lt;p&gt;This is the classic problem. You submit your form with a file using &lt;code&gt;form.patch()&lt;/code&gt; and when you dump the request in your controller, the file is null or missing entirely.​&lt;/p&gt;

&lt;h3&gt;
  
  
  Here is what typically fails:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useForm&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Product Name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;patch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'products.update'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your Laravel controller, request file image returns null even though you selected a file.​&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution:
&lt;/h3&gt;

&lt;p&gt;Use method spoofing by switching to &lt;code&gt;POST&lt;/code&gt; and adding the underscore method field. Laravel recognizes this pattern and treats your request as &lt;code&gt;PUT&lt;/code&gt; or &lt;code&gt;PATCH&lt;/code&gt;.​&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="n"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;router&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@inertiajs/vue3'&lt;/span&gt;

&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useForm&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="n"&gt;_method&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'put'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Product Name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'products.update'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, use the router directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`/products/${product.id}`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;_method&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'put'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This workaround leverages Laravel’s built-in method spoofing support, which checks for the underscore method field and routes your request correctly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Issue 2: Empty Request Data with &lt;code&gt;FormData&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Sometimes the entire request arrives empty when you use &lt;code&gt;PUT&lt;/code&gt; or &lt;code&gt;PATCH&lt;/code&gt; with files. Your request all returns an empty array and even text fields go missing.​&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/enums-how-laravel-devs-cut-bugs-by-50-d1c4af86929a?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>typesafety</category>
      <category>webdev</category>
      <category>php</category>
      <category>laravel</category>
    </item>
    <item>
      <title>PHP 8.4 + Laravel: Building Bulletproof Apps with Type Safety</title>
      <dc:creator>Manjeet Singh</dc:creator>
      <pubDate>Tue, 07 Oct 2025 13:02:04 +0000</pubDate>
      <link>https://dev.to/codermanjeet/php-84-laravel-building-bulletproof-apps-with-type-safety-1khl</link>
      <guid>https://dev.to/codermanjeet/php-84-laravel-building-bulletproof-apps-with-type-safety-1khl</guid>
      <description>&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/php-8-4-laravel-building-bulletproof-apps-with-type-safety-a478cbd04250?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdq0dk31aersl67u931ut.png" alt="PHP 8.4 + Laravel: Building Bulletproof Apps with Type Safety" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In 2025, with PHP 8.4 hitting its stride and Laravel 12 leaning hard into type hints, we’re finally ditching those “undefined index” nigh...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/php-8-4-laravel-building-bulletproof-apps-with-type-safety-a478cbd04250?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>phpdevelopers</category>
      <category>typesafety</category>
      <category>php</category>
    </item>
    <item>
      <title>7 Laravel Mistakes Even Seasoned Devs Make — Fix Them Before They Bite You</title>
      <dc:creator>Manjeet Singh</dc:creator>
      <pubDate>Tue, 30 Sep 2025 13:02:07 +0000</pubDate>
      <link>https://dev.to/codermanjeet/7-laravel-mistakes-even-seasoned-devs-make-fix-them-before-they-bite-you-4jnp</link>
      <guid>https://dev.to/codermanjeet/7-laravel-mistakes-even-seasoned-devs-make-fix-them-before-they-bite-you-4jnp</guid>
      <description>&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/7-laravel-mistakes-even-seasoned-devs-make-fix-them-before-they-bite-you-4be6928aaa77?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnz2u9wearhjr6n21j27h.jpeg" alt="7 Laravel Mistakes Even Seasoned Devs Make" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hey fellow Laravel artisans, I’m Manjeet, and I’ve been knee-deep in Laravel projects for years now. Whether you’re just starting out or…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/7-laravel-mistakes-even-seasoned-devs-make-fix-them-before-they-bite-you-4be6928aaa77?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>developertips</category>
      <category>webdev</category>
      <category>php</category>
      <category>commonmistakes</category>
    </item>
    <item>
      <title>Stop Guessing Batch Status: Laravel 12 Job Batching With Real-Time Progress</title>
      <dc:creator>Manjeet Singh</dc:creator>
      <pubDate>Thu, 18 Sep 2025 13:02:06 +0000</pubDate>
      <link>https://dev.to/codermanjeet/stop-guessing-batch-status-laravel-12-job-batching-with-real-time-progress-3ppn</link>
      <guid>https://dev.to/codermanjeet/stop-guessing-batch-status-laravel-12-job-batching-with-real-time-progress-3ppn</guid>
      <description>&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/stop-guessing-batch-status-laravel-12-resilient-job-batching-65c59a7df42a?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn1pnd3stowy4qi6rz59m.jpeg" alt="Laravel 12 Job Batching With Real-Time Progress" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bulk notifications that time out, clog workers, and leave dashboards guessing aren’t a scaling strategy — they’re a fire drill. The real…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/stop-guessing-batch-status-laravel-12-resilient-job-batching-65c59a7df42a?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>realtime</category>
      <category>webdev</category>
      <category>php</category>
      <category>laravel</category>
    </item>
    <item>
      <title>5 Non‑Negotiable Laravel Security Practices Developers Must Follow</title>
      <dc:creator>Manjeet Singh</dc:creator>
      <pubDate>Tue, 16 Sep 2025 13:01:57 +0000</pubDate>
      <link>https://dev.to/codermanjeet/5-non-negotiable-laravel-security-practices-developers-must-follow-a9j</link>
      <guid>https://dev.to/codermanjeet/5-non-negotiable-laravel-security-practices-developers-must-follow-a9j</guid>
      <description>&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/5-non-negotiable-laravel-security-practices-developers-must-follow-35b9c29e70df?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb45sja2y1wnvfc7936mk.jpeg" alt="5 Non‑Negotiable Laravel Security Practices Developers Must Follow" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After years building and auditing Laravel apps, these five non‑negotiable security habits have kept incidents rare and confidence high.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codermanjeet.medium.com/5-non-negotiable-laravel-security-practices-developers-must-follow-35b9c29e70df?source=rss-cbf837cd904a------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>php</category>
      <category>bestpractices</category>
      <category>laravel</category>
    </item>
  </channel>
</rss>
