Installation, Configuration and Usage - minhliem86/modules GitHub Wiki

Welcome to the modules packages for laravel 5.2 and above!

1. Required package follow: composer required liemphan:1.0

2. Configuration

Add to composer.json file

        "psr-4": {
            "App\\": "app/",
            "App\\Modules\\" : "app/Modules"
        }

Add Service Provider

/** ServiceProvider Needed **/
Liemphan\modules\ModulesServiceProvider::class,
UniSharp\LaravelFilemanager\LaravelFilemanagerServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
Yajra\Datatables\DatatablesServiceProvider::class,
Spatie\Analytics\AnalyticsServiceProvider::class,
\Krucas\Notification\NotificationServiceProvider::class,
Codingo\Dropzoner\DropzonerServiceProvider::class,
Laratrust\LaratrustServiceProvider::class,
Maatwebsite\Excel\ExcelServiceProvider::class,

Add to Facade

/** ALIAS **/
'Image' => Intervention\Image\Facades\Image::class,
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
'Datatables' => Yajra\Datatables\Facades\Datatables::class,
'Analytics' => Spatie\Analytics\AnalyticsFacade::class,
'Notification' => Krucas\Notification\Facades\Notification::class,
'Laratrust'   => Laratrust\LaratrustFacade::class,
'Excel' => Maatwebsite\Excel\Facades\Excel::class,

Run composer dump-autoload

php artisan vendor:publish --force

Add into composer.json

"classmap": [
            "database",
            "resources/myLib"
        ],

Add into app.php -> ServiceProvider

App\Modules\ModuleServiceProvider::class,