Skip to content

Instantly share code, notes, and snippets.

@DvdQzd
Created May 8, 2018 05:16
Show Gist options
  • Save DvdQzd/ef9efc32eeecb1123a079c8fdaf44ed8 to your computer and use it in GitHub Desktop.
Save DvdQzd/ef9efc32eeecb1123a079c8fdaf44ed8 to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
//Agregamos nuestra ruta al controller de Pokemons
Route::resource('pokemons', 'PokemonController');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment