lundi 3 septembre 2018

Problems of routes in own package- Laravel 5.6

I have created a laravel package and I have added routes, views, migrations, etc. and I have linked it to my project. Up to here everything is correct, but authentication is not working, the only thing I have done has been to generate the authentication routes as in a normal laravel project and I have added it to the group of routes in the following way:

    <?php

use Illuminate\http\Request;

//That file is the package's web.php

Route::group(['namespace'=>'myPackage\Blog\Http\Controllers', 'middleware' => 'auth'], function(){
    Route::get('blog','BlogController@index')->name('blog');
    Route::post('blog', 'BlogController@send');


    Route::get('administrador', 'adminController@index')->name('administrador');
});

simply by adding 'middleware' => 'auth', these routes stop working, some idea of ​​what I should do? Thank you!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire