| @@ -49,7 +49,7 @@ discard block | ||
| 49 | 49 | Acl::GUARD_TYPE_ROUTE => [ | 
| 50 | 50 | // resource, [roles as array], [privileges as array] | 
| 51 | 51 | ['/api/token', ['guest'], [Acl::PRIVILEGE_POST]], | 
| 52 | - ['/api/user', ['user'], [Acl::PRIVILEGE_GET]], | |
| 52 | + ['/api/user', ['user'], [Acl::PRIVILEGE_GET]], | |
| 53 | 53 | ], | 
| 54 | 54 | |
| 55 | 55 | /** | 
| @@ -61,15 +61,15 @@ discard block | ||
| 61 | 61 | */ | 
| 62 | 62 | Acl::GUARD_TYPE_CALLABLE => [ | 
| 63 | 63 | // resource, [roles as array], [privileges as array] | 
| 64 | - ['App\Controller\CrudController', ['user']], | |
| 65 | - ['App\Controller\CrudController:actionIndex', ['user']], | |
| 66 | - ['App\Controller\CrudController:actionGet', ['user']], | |
| 64 | + ['App\Controller\CrudController', ['user']], | |
| 65 | + ['App\Controller\CrudController:actionIndex', ['user']], | |
| 66 | + ['App\Controller\CrudController:actionGet', ['user']], | |
| 67 | 67 | ['App\Controller\CrudController:actionCreate', ['user']], | 
| 68 | 68 | ['App\Controller\CrudController:actionUpdate', ['user']], | 
| 69 | 69 | ['App\Controller\CrudController:actionDelete', ['user']], | 
| 70 | 70 | |
| 71 | - ['App\Controller\UserController:actionIndex', ['user']], | |
| 72 | - ['App\Controller\UserController:actionGet', ['user']], | |
| 71 | + ['App\Controller\UserController:actionIndex', ['user']], | |
| 72 | + ['App\Controller\UserController:actionGet', ['user']], | |
| 73 | 73 | ['App\Controller\UserController:actionCreate', ['admin']], | 
| 74 | 74 | ['App\Controller\UserController:actionUpdate', ['admin']], | 
| 75 | 75 | ['App\Controller\UserController:actionDelete', ['admin']], | 
| @@ -1,13 +1,13 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | 3 | // PATH aliases | 
| 4 | -define('ROOT_PATH',          __DIR__ ); | |
| 5 | -define('MIGRATIONS_PATH',    __DIR__ . '/app/database/migrations'); | |
| 6 | -define('SEEDS_PATH',         __DIR__ . '/app/database/seeds'); | |
| 7 | -define('MODELS_PATH',        __DIR__ . '/app/src/Model'); | |
| 8 | -define('SCHEMAS_PATH',       __DIR__ . '/app/src/Schema'); | |
| 9 | -define('COMMANDS_PATH',      __DIR__ . '/app/src/Console/Commands'); | |
| 10 | -define('CODE_TEMPLATE_PATH', __DIR__ . '/app/src/Console/CodeTemplates'); | |
| 11 | -define('CONFIG_PATH',        __DIR__ . '/config'); | |
| 12 | -define('APP_PATH',           __DIR__ . '/app'); | |
| 4 | +define('ROOT_PATH', __DIR__); | |
| 5 | +define('MIGRATIONS_PATH', __DIR__.'/app/database/migrations'); | |
| 6 | +define('SEEDS_PATH', __DIR__.'/app/database/seeds'); | |
| 7 | +define('MODELS_PATH', __DIR__.'/app/src/Model'); | |
| 8 | +define('SCHEMAS_PATH', __DIR__.'/app/src/Schema'); | |
| 9 | +define('COMMANDS_PATH', __DIR__.'/app/src/Console/Commands'); | |
| 10 | +define('CODE_TEMPLATE_PATH', __DIR__.'/app/src/Console/CodeTemplates'); | |
| 11 | +define('CONFIG_PATH', __DIR__.'/config'); | |
| 12 | +define('APP_PATH', __DIR__.'/app'); | |
| 13 | 13 | |
| @@ -53,7 +53,7 @@ | ||
| 53 | 53 | '<class>', | 
| 54 | 54 | '<tableName>', | 
| 55 | 55 | ]; | 
| 56 | - $replacements = [ | |
| 56 | + $replacements = [ | |
| 57 | 57 | Helper::underscoreToCamelCase($migrationName, true), | 
| 58 | 58 | strtolower($migrationName), | 
| 59 | 59 | ]; | 
| @@ -239,17 +239,17 @@ | ||
| 239 | 239 | public function getAttributes($entity) | 
| 240 | 240 |      { | 
| 241 | 241 | return [ | 
| 242 | - 'email' => (string)$entity->email, | |
| 243 | - 'full_name' => (string)$entity->full_name, | |
| 244 | - 'password' => (string)$entity->password, | |
| 245 | - 'password_reset_token' => (string)$entity->password_reset_token, | |
| 246 | - 'role_id' => (integer)$entity->role_id, | |
| 247 | - 'created_by' => (integer)$entity->created_by, | |
| 248 | - 'updated_by' => (integer)$entity->updated_by, | |
| 249 | -			'created_at'	=> Carbon::parse($entity->created_at)->setTimezone('UTC')->format(Carbon::ISO8601), | |
| 250 | -			'updated_at'	=> Carbon::parse($entity->updated_at)->setTimezone('UTC')->format(Carbon::ISO8601), | |
| 251 | -			'deleted_at'	=> Carbon::parse($entity->deleted_at)->setTimezone('UTC')->format(Carbon::ISO8601), | |
| 252 | - 'status' => (integer)$entity->status, | |
| 242 | + 'email' => (string)$entity->email, | |
| 243 | + 'full_name' => (string)$entity->full_name, | |
| 244 | + 'password' => (string)$entity->password, | |
| 245 | + 'password_reset_token' => (string)$entity->password_reset_token, | |
| 246 | + 'role_id' => (integer)$entity->role_id, | |
| 247 | + 'created_by' => (integer)$entity->created_by, | |
| 248 | + 'updated_by' => (integer)$entity->updated_by, | |
| 249 | +            'created_at'	=> Carbon::parse($entity->created_at)->setTimezone('UTC')->format(Carbon::ISO8601), | |
| 250 | +            'updated_at'	=> Carbon::parse($entity->updated_at)->setTimezone('UTC')->format(Carbon::ISO8601), | |
| 251 | +            'deleted_at'	=> Carbon::parse($entity->deleted_at)->setTimezone('UTC')->format(Carbon::ISO8601), | |
| 252 | + 'status' => (integer)$entity->status, | |
| 253 | 253 | ]; | 
| 254 | 254 | } | 
| 255 | 255 | } |