<?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: Salem Malick MOHAMED</title>
    <description>The latest articles on DEV Community by Salem Malick MOHAMED (@salem_dev).</description>
    <link>https://dev.to/salem_dev</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%2F2846609%2F3e97239b-7204-4ed1-a1f1-42386acb8dec.jpg</url>
      <title>DEV Community: Salem Malick MOHAMED</title>
      <link>https://dev.to/salem_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/salem_dev"/>
    <language>en</language>
    <item>
      <title>Package for Generating a full API on LARAVEL</title>
      <dc:creator>Salem Malick MOHAMED</dc:creator>
      <pubDate>Mon, 05 May 2025 08:30:51 +0000</pubDate>
      <link>https://dev.to/salem_dev/package-for-generating-a-full-api-on-laravel-8i2</link>
      <guid>https://dev.to/salem_dev/package-for-generating-a-full-api-on-laravel-8i2</guid>
      <description>&lt;p&gt;&lt;a href="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%2Fvj9dha86smr4gilhtm6l.jpeg" class="article-body-image-wrapper"&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%2Fvj9dha86smr4gilhtm6l.jpeg" alt="Image description" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Saloum45/ControllerGenerate is a Laravel package that makes it easy to dynamically generate controllers, migrations and routes in a Laravel application &lt;a href="https://packagist.org/packages/saloum45/controllergenerate" rel="noopener noreferrer"&gt;here the link&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  complete tuto : &lt;a href="https://www.youtube.com/watch?v=YJmBQQF3ODU" rel="noopener noreferrer"&gt;Youtube&lt;/a&gt;
&lt;/h4&gt;

&lt;h3&gt;
  
  
  How it works 👉🏽👉🏽👉🏽👉🏽 😇NB😇: you must first create the models before installing the package, because the package is based on the models for generation.
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Constraints 👉🏽👉🏽👉🏽👉🏽 😇NB😇: for foreign keys you must respect this naming : id_table_name example : id_classe.
&lt;/h3&gt;

&lt;p&gt;Installation: Add the package to your Laravel project via Composer by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;composer require saloum45/controllergenerate
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Configuration: The package service provider, PackageServiceProvider, is automatically registered during installation. This provider will create the necessary commands in the app/Console/Commands folder.&lt;/p&gt;

&lt;p&gt;Order execution:&lt;/p&gt;

&lt;h4&gt;
  
  
  To generate the controllers, run the following command in your terminal:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;php artisan generate:controllers
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  To generate routes, run:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;php artisan generate:routes
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  To generate migrations, run:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;php artisan generate:migrations
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  to migrer and seed, run :
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;php artisan migrate 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result: After the commands are executed, controllers with CRUD methods will be created in the app/Http/Controllers folder, migrations in the database/migrations folder and the corresponding routes will be added to your API routes file ...&lt;/p&gt;

&lt;h2&gt;
  
  
  👈🏽Good code👉🏽
&lt;/h2&gt;

</description>
      <category>blog</category>
      <category>programming</category>
      <category>laravel</category>
    </item>
  </channel>
</rss>
