PHP code example of mnabialek / laravel-modular

1. Go to this page and download the library: Download mnabialek/laravel-modular library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mnabialek / laravel-modular example snippets

   
   composer 

        Mnabialek\LaravelModular\Providers\ModularServiceProvider::class,
       

        'Modular' => Mnabialek\LaravelModular\Facades\Modular::class,
        

    php artisan vendor:publish --provider="Mnabialek\LaravelModular\Providers\ModularServiceProvider"
    

     Modular::seed($this);
    

    \Modular::loadRoutes($this->app['router'], 'web');
    \Modular::loadRoutes($this->app['router'], 'api');
    

    Modular::loadFactories($factory);
    

php artisan module:make TestModule

php artisan module:make TestModule2

php artisan module:make Product Order

php artisan module:make Product Camera Radio

php artisan module:make-migration Product create_products_table

php artisan module:make-migration Product create_camera_table --table=cameras --type=create

php artisan module:seed Product Order

php artisan migrate

php artisan db:seed

\Modular::loadRoutes($this->app['router']);