1. Go to this page and download the library: Download an5dy/laravel-admin-modules 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/ */
an5dy / laravel-admin-modules example snippets
...
use App\{模块名}\Middleware\ModuleBootstrap;
class {模块名}ServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
app('router')->aliasMiddleware('admin.bootstrap', ModuleBootstrap::class);
}
...
}