@@ -12,14 +12,14 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | // Home Page |
| 15 | -$app->get('/', function () use ($app){ |
|
| 15 | +$app->get('/', function() use ($app){ |
|
| 16 | 16 | return $app->version(); |
| 17 | 17 | }); |
| 18 | 18 | |
| 19 | 19 | // Posts |
| 20 | -$app->get('/posts','PostController@index'); |
|
| 21 | -$app->post('/posts','PostController@store'); |
|
| 22 | -$app->get('/posts/{post_id}','PostController@show'); |
|
| 20 | +$app->get('/posts', 'PostController@index'); |
|
| 21 | +$app->post('/posts', 'PostController@store'); |
|
| 22 | +$app->get('/posts/{post_id}', 'PostController@show'); |
|
| 23 | 23 | $app->put('/posts/{post_id}', 'PostController@update'); |
| 24 | 24 | $app->patch('/posts/{post_id}', 'PostController@update'); |
| 25 | 25 | $app->delete('/posts/{post_id}', 'PostController@destroy'); |
@@ -40,11 +40,11 @@ |
||
| 40 | 40 | * @return int|boolean |
| 41 | 41 | * @see https://github.com/lucadegasperi/oauth2-server-laravel/blob/master/docs/authorization-server/password.md |
| 42 | 42 | */ |
| 43 | - public function verify($email, $password){ |
|
| 43 | + public function verify($email, $password) { |
|
| 44 | 44 | |
| 45 | 45 | $user = User::where('email', $email)->first(); |
| 46 | 46 | |
| 47 | - if($user && Hash::check($password, $user->password)){ |
|
| 47 | + if ($user && Hash::check($password, $user->password)) { |
|
| 48 | 48 | return $user->id; |
| 49 | 49 | } |
| 50 | 50 | |