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.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2qX1vDq
via IFTTT

Aucun commentaire:

Enregistrer un commentaire