- @if (Route::has('login'))
-
- @endif
-
-
-
-
-
diff --git a/routes/api.php b/routes/api.php
index 387ad98..c56bf3e 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -1,5 +1,6 @@
get('/user', function (Request $request) {
- return $request->user();
-});
-
/*
* Welcome route - link to any public API documentation here
*/
@@ -24,16 +21,14 @@
echo 'Welcome to our API';
});
-/**
- * @var $api \Dingo\Api\Routing\Router
- */
+/** @var \Dingo\Api\Routing\Router $api */
$api = app('Dingo\Api\Routing\Router');
-$api->version('v1', ['middleware' => ['api']], function ($api) {
+$api->version('v1', ['middleware' => ['api']], function (Router $api) {
/*
* Authentication
*/
- $api->group(['prefix' => 'auth'], function ($api) {
- $api->group(['prefix' => 'jwt'], function ($api) {
+ $api->group(['prefix' => 'auth'], function (Router $api) {
+ $api->group(['prefix' => 'jwt'], function (Router $api) {
$api->get('/token', 'App\Http\Controllers\Auth\AuthController@token');
});
});
@@ -41,12 +36,12 @@
/*
* Authenticated routes
*/
- $api->group(['middleware' => ['api.auth']], function ($api) {
+ $api->group(['middleware' => ['api.auth']], function (Router $api) {
/*
* Authentication
*/
- $api->group(['prefix' => 'auth'], function ($api) {
- $api->group(['prefix' => 'jwt'], function ($api) {
+ $api->group(['prefix' => 'auth'], function (Router $api) {
+ $api->group(['prefix' => 'jwt'], function (Router $api) {
$api->get('/refresh', 'App\Http\Controllers\Auth\AuthController@refresh');
$api->delete('/token', 'App\Http\Controllers\Auth\AuthController@logout');
});
@@ -57,7 +52,7 @@
/*
* Users
*/
- $api->group(['prefix' => 'users', 'middleware' => 'check_role:admin'], function ($api) {
+ $api->group(['prefix' => 'users', 'middleware' => 'check_role:admin'], function (Router $api) {
$api->get('/', 'App\Http\Controllers\UserController@getAll');
$api->get('/{uuid}', 'App\Http\Controllers\UserController@get');
$api->post('/', 'App\Http\Controllers\UserController@post');
@@ -69,7 +64,7 @@
/*
* Roles
*/
- $api->group(['prefix' => 'roles'], function ($api) {
+ $api->group(['prefix' => 'roles'], function (Router $api) {
$api->get('/', 'App\Http\Controllers\RoleController@getAll');
});
});
diff --git a/server.php b/server.php
index b07fa44..5fb6379 100644
--- a/server.php
+++ b/server.php
@@ -3,8 +3,10 @@
/**
* Laravel - A PHP Framework For Web Artisans
*
+ * @package Laravel
* @author Taylor Otwell