dimanche 25 juin 2017

how i can read and write user details in laravel 5.3 passport

my controller code is to retrieve user details

 public function allUser(){
    return User::all();
}

my route is in api.php file

Route::get('/users','Auth\RegisterController@allUser')->middleware('auth');

this gives me error unauthenticated but i want all users using middleware please help me. Thank You



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire