I am having problem with Auth::routes()
I use the framework Laravel
in version 5.2
my route file is like this:
Route::singularResourceParameters();
Auth::routes();
Route::group(['middleware' => ['cors']], function (){
Route::resource('clientes', 'ClienteController');
Route::resource('categorias', 'CategoriaController');
Route::resource('embalagens', 'EmbalagemController');
Route::resource('tipo_produtos', 'TipoProdutoController');
Route::resource('subcategorias', 'SubCategoriaController');
Route::resource('produtos', 'ProdutoController');
Route::resource('loteproduto', 'LoteProdutoController');
});
Route::get('/', [
'uses' => 'Dashboard@index',
'as' => 'dashboard.index'
]);
And in my controllers
I added this constructor:
public function __construct()
{
$this->middleware('auth');
}
When I try to enter a page, this error occurs: call_user_func_array () expects parameter 1 to be a valid callback, class 'Illuminate \ Auth \ SessionGuard' does not have a method 'routes'
What can this be?