mercredi 25 avril 2018

How to define controller path in Laravel Package

I want to create a package with Laravel and Route my APIs to my package controllers. Without theirs Folder address. So I need something like this:

Route::prefix('message')->group(function () {
    Route::get('/', 'CustomMessageController@index');
});

And I fount somthing like this:

Route::prefix('message')->group(function () {
    Route::get('/', 'Http/Controllers/CustomMessageController@index');
});

In addition I want to define all controller automatically in the ServiceProvider 'boot' method but i can find just somthing like this:

$this->app->make('Devdojo\Calculator\CalculatorController');

Thanks.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire