dimanche 25 octobre 2020

How to make URL from Laravel routes

I've got Laravel backend and I'm trying to make iOS to it, but there is no documentation. It is my first time with Laravel, so confused with the routes and middlewares. How do I compose URL from code below

Route::middleware('auth:api')->get('/user', function (Request $request) {
   return $request->user();
});

// Passport authentication
Route::group([
   'prefix' => 'auth'
], function () {
   Route::post('login', 'AuthController@login');
   Route::post('signup', 'AuthController@signup');

   Route::group([
     'middleware' => 'auth:api'
   ], function() {
       Route::get('logout', 'AuthController@logout');
       Route::get('user', 'AuthController@user');
       Route::resource('materials', 'MaterialsController');
       Route::resource('packages', 'PackagesController'); ```


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

Aucun commentaire:

Enregistrer un commentaire