PHP code example of jminayat / modules-laravel

1. Go to this page and download the library: Download jminayat/modules-laravel 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/ */

    

jminayat / modules-laravel example snippets




return [

  /*
   * Name of the table to use
   * default value but you may easily change it to any table you like.
   */

   'table_name'  =>  'modules',

];

Module::all();

Module::get('test');

Module::getEnabled();

Module::getDisabled();

Module::has('test');

Module::count();

Module::install('path/file.zip');

Module::moduleMigrate('test');

Module::moduleRollback('test');

Module::moduleMigrateAll();

Module::moduleRollbackAll();

$module = Module::get('test');

$module->studlyName();

$module->status();

$module->active();

$module->disable();

$module->delete();

$module->getPath();

$module->getModuleJson();
 bash
php artisan vendor:publish --provider="JMinayaT\Modules\ModulesServiceProvider" --tag="migrations"
bash
php artisan migrate
 bash
php artisan vendor:publish --provider="JMinayaT\Modules\ModulesServiceProvider" --tag="config"
 bash
php artisan module:create <module-name>

modules/
  ├── Blog/
      ├── Controllers/
      ├── Database/
          ├── migrations/
      ├── Models/
      ├── Resources/
          ├── Assets/
          ├── lang/
          ├── views/
      ├── Route/
          ├── web.php
          ├── api.php
      ├── module.json


php artisan module:active test true 

php artisan module:create test

php artisan module:make-controller test TestController

php artisan module:make-middleware test TestMiddleware

php artisan module:make-request test TestRequest

php artisan module:make-model test TestModel

php artisan module:make-seeder test testSeeder

php artisan module:make-factory test testFactory

php artisan module:make-policy test testPolicy

php artisan module:publish test

php artisan module:migrate

php artisan module:migrate test

php artisan module:rollback

php artisan module:rollback test

php artisan module:sedd

php artisan module:seed test