下面由Laravel教程栏目给大家介绍使用 Laravel-Modules 扩展包通过模块化开发 Laravel 应用,希望对需要的朋友有所帮助!
composer require nwidart/laravel-modules
php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider"
php artisan module:make Blog
php artisan module:make Blog User
{ "autoload": { "psr-4": { "App\\": "app/", "Modules\\": "Modules/" } } }
composer dump-autoload
命令让修改生效The above is the detailed content of Teach you to use the Laravel-Modules extension package to develop Laravel applications through modularization. For more information, please follow other related articles on the PHP Chinese website!