Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

Commit

Permalink
laravel : route
Browse files Browse the repository at this point in the history
  • Loading branch information
r567tw committed Sep 17, 2019
1 parent 9194c66 commit 83e076b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
6 changes: 5 additions & 1 deletion routes/api.php
Expand Up @@ -13,6 +13,10 @@
|
*/

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

Route::get('/hello/{name}', function ($name) {
return 'Hello API' . $name;
});
4 changes: 4 additions & 0 deletions routes/console.php
Expand Up @@ -16,3 +16,7 @@
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->describe('Display an inspiring quote');

Artisan::command('helloworld', function () {
$this->comment('Hello World');
})->describe('Display Hello World');
9 changes: 9 additions & 0 deletions routes/web.php
Expand Up @@ -14,3 +14,12 @@
Route::get('/', function () {
return view('welcome');
});


Route::get('/hello', function () {
return 'Hello World';
});

Route::get('/hello/{name}', function ($x) {
return 'Hello ' . $x;
});

0 comments on commit 83e076b

Please sign in to comment.