<?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: Muhammed Salama</title>
    <description>The latest articles on DEV Community by Muhammed Salama (@muhammed_salama_91643ccc5).</description>
    <link>https://dev.to/muhammed_salama_91643ccc5</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1582245%2Fa3be3bba-018f-4f48-b361-7f74644a8ab2.jpg</url>
      <title>DEV Community: Muhammed Salama</title>
      <link>https://dev.to/muhammed_salama_91643ccc5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammed_salama_91643ccc5"/>
    <language>en</language>
    <item>
      <title>Stop Writing the Same Laravel Boilerplate: Generate a Complete Module with One Artisan Command</title>
      <dc:creator>Muhammed Salama</dc:creator>
      <pubDate>Tue, 30 Jun 2026 09:37:56 +0000</pubDate>
      <link>https://dev.to/muhammed_salama_91643ccc5/stop-writing-the-same-laravel-boilerplate-generate-a-complete-module-with-one-artisan-command-5b0n</link>
      <guid>https://dev.to/muhammed_salama_91643ccc5/stop-writing-the-same-laravel-boilerplate-generate-a-complete-module-with-one-artisan-command-5b0n</guid>
      <description>&lt;h1&gt;
  
  
  Stop Writing the Same Laravel Boilerplate: Generate a Complete Module with One Artisan Command
&lt;/h1&gt;

&lt;p&gt;Every Laravel developer has experienced this.&lt;/p&gt;

&lt;p&gt;You start implementing a new feature and immediately create the same files you've created dozens of times before:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model&lt;/li&gt;
&lt;li&gt;Migration&lt;/li&gt;
&lt;li&gt;Repository&lt;/li&gt;
&lt;li&gt;Service&lt;/li&gt;
&lt;li&gt;Form Request&lt;/li&gt;
&lt;li&gt;API Resource&lt;/li&gt;
&lt;li&gt;Policy&lt;/li&gt;
&lt;li&gt;Filter&lt;/li&gt;
&lt;li&gt;Status Enum&lt;/li&gt;
&lt;li&gt;Feature Tests&lt;/li&gt;
&lt;li&gt;Unit Tests&lt;/li&gt;
&lt;li&gt;Swagger/OpenAPI annotations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The process is repetitive, time-consuming, and easy to get wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;While Laravel provides excellent generators, building a production-ready API module still requires running many Artisan commands and wiring everything together manually.&lt;/p&gt;

&lt;p&gt;For large projects following Repository and Service Layer architectures, this becomes even more repetitive.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;I built &lt;strong&gt;Laravel Base&lt;/strong&gt;, an open-source package that generates an entire production-ready module from a single command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan make:module Product
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generated module includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Model&lt;/li&gt;
&lt;li&gt;✅ Migration&lt;/li&gt;
&lt;li&gt;✅ Repository Pattern&lt;/li&gt;
&lt;li&gt;✅ Service Layer&lt;/li&gt;
&lt;li&gt;✅ Form Requests&lt;/li&gt;
&lt;li&gt;✅ API Resources&lt;/li&gt;
&lt;li&gt;✅ Filters &amp;amp; Pagination&lt;/li&gt;
&lt;li&gt;✅ Policies&lt;/li&gt;
&lt;li&gt;✅ Status Enums&lt;/li&gt;
&lt;li&gt;✅ Swagger/OpenAPI annotations&lt;/li&gt;
&lt;li&gt;✅ Feature Tests&lt;/li&gt;
&lt;li&gt;✅ Unit Tests&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Modern Development Experience
&lt;/h2&gt;

&lt;p&gt;The package is actively maintained and includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Laravel 10–13 support&lt;/li&gt;
&lt;li&gt;PHP 8.1–8.4 compatibility&lt;/li&gt;
&lt;li&gt;GitHub Actions CI&lt;/li&gt;
&lt;li&gt;PHPStan static analysis&lt;/li&gt;
&lt;li&gt;Laravel Pint code style&lt;/li&gt;
&lt;li&gt;Automated releases&lt;/li&gt;
&lt;li&gt;Repository automation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why I Built It
&lt;/h2&gt;

&lt;p&gt;After working on multiple Laravel projects, I noticed I was spending too much time generating the same project structure instead of focusing on business logic.&lt;/p&gt;

&lt;p&gt;I wanted a tool that lets developers start implementing features immediately rather than setting up folders and classes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feedback Welcome
&lt;/h2&gt;

&lt;p&gt;Laravel Base is open source, and I'd love to hear your thoughts.&lt;/p&gt;

&lt;p&gt;GitHub Repository:&lt;br&gt;
&lt;a href="https://github.com/MuhammedMSalama/LaravelBase" rel="noopener noreferrer"&gt;https://github.com/MuhammedMSalama/LaravelBase&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Packagist:&lt;br&gt;
&lt;a href="https://packagist.org/packages/muhammedsalama/laravel-base" rel="noopener noreferrer"&gt;https://packagist.org/packages/muhammedsalama/laravel-base&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The package was recently featured by Laravel News, and I'm continuing to improve it based on community feedback.&lt;/p&gt;

&lt;p&gt;If you have ideas, suggestions, or feature requests, I'd be happy to hear them.&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
