@@ -96,5 +96,5 @@ |
||
| 96 | 96 | | of "email". This simply helps us make messages a little cleaner. |
| 97 | 97 | | |
| 98 | 98 | */ |
| 99 | - 'attributes' => [ ], |
|
| 99 | + 'attributes' => [], |
|
| 100 | 100 | ]; |
| 101 | 101 | \ No newline at end of file |
@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | |
| 4 | 4 | class CreateRolesToRightTable{ |
| 5 | 5 | /** |
| 6 | - * Do the migration |
|
| 7 | - */ |
|
| 6 | + * Do the migration |
|
| 7 | + */ |
|
| 8 | 8 | public function up() |
| 9 | 9 | { |
| 10 | 10 | Capsule::schema()->create('roles_to_rights', function($table) |
@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * Undo the migration |
|
| 21 | - */ |
|
| 20 | + * Undo the migration |
|
| 21 | + */ |
|
| 22 | 22 | public function down() |
| 23 | 23 | { |
| 24 | 24 | Capsule::schema()->drop('roles_to_rights'); |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Capsule::schema()->create('rights', function($table) |
|
| 12 | - { |
|
| 11 | + Capsule::schema()->create('rights', function($table) { |
|
| 13 | 12 | $table->increments('id'); |
| 14 | 13 | $table->string('name')->unique(); |
| 15 | 14 | $table->string('description'); |
@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | |
| 4 | 4 | class CreateRolesToRightTable{ |
| 5 | 5 | /** |
| 6 | - * Do the migration |
|
| 7 | - */ |
|
| 6 | + * Do the migration |
|
| 7 | + */ |
|
| 8 | 8 | public function up() |
| 9 | 9 | { |
| 10 | 10 | Capsule::schema()->create('roles_to_rights', function($table) |
@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * Undo the migration |
|
| 21 | - */ |
|
| 20 | + * Undo the migration |
|
| 21 | + */ |
|
| 22 | 22 | public function down() |
| 23 | 23 | { |
| 24 | 24 | Capsule::schema()->drop('roles_to_rights'); |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Capsule::schema()->create('users', function($table) |
|
| 12 | - { |
|
| 11 | + Capsule::schema()->create('users', function($table) { |
|
| 13 | 12 | $table->increments('id'); |
| 14 | 13 | $table->string('email')->unique(); |
| 15 | 14 | $table->string('full_name'); |
@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | |
| 4 | 4 | class CreateRolesToRightTable{ |
| 5 | 5 | /** |
| 6 | - * Do the migration |
|
| 7 | - */ |
|
| 6 | + * Do the migration |
|
| 7 | + */ |
|
| 8 | 8 | public function up() |
| 9 | 9 | { |
| 10 | 10 | Capsule::schema()->create('roles_to_rights', function($table) |
@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * Undo the migration |
|
| 21 | - */ |
|
| 20 | + * Undo the migration |
|
| 21 | + */ |
|
| 22 | 22 | public function down() |
| 23 | 23 | { |
| 24 | 24 | Capsule::schema()->drop('roles_to_rights'); |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Capsule::schema()->create('logs', function($table) |
|
| 12 | - { |
|
| 11 | + Capsule::schema()->create('logs', function($table) { |
|
| 13 | 12 | $table->increments('id'); |
| 14 | 13 | $table->string('action'); |
| 15 | 14 | $table->morphs('entity'); |
@@ -12,8 +12,8 @@ |
||
| 12 | 12 | |
| 13 | 13 | public function actionIndex() |
| 14 | 14 | { |
| 15 | - echo 'This is sample console command.' . PHP_EOL; |
|
| 16 | - echo 'Actions: ' . PHP_EOL; |
|
| 17 | - echo 'partisan sample index' . PHP_EOL; |
|
| 15 | + echo 'This is sample console command.'.PHP_EOL; |
|
| 16 | + echo 'Actions: '.PHP_EOL; |
|
| 17 | + echo 'partisan sample index'.PHP_EOL; |
|
| 18 | 18 | } |
| 19 | 19 | } |
@@ -96,5 +96,5 @@ |
||
| 96 | 96 | | of "email". This simply helps us make messages a little cleaner. |
| 97 | 97 | | |
| 98 | 98 | */ |
| 99 | - 'attributes' => [ ], |
|
| 99 | + 'attributes' => [], |
|
| 100 | 100 | ]; |
| 101 | 101 | \ No newline at end of file |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | // monolog settings |
| 9 | 9 | 'logger' => [ |
| 10 | 10 | 'name' => 'app', |
| 11 | - 'path' => __DIR__ . '/../log/app.log', |
|
| 11 | + 'path' => __DIR__.'/../log/app.log', |
|
| 12 | 12 | ], |
| 13 | 13 | |
| 14 | - 'mailTemplate' => __DIR__ . '/../mail', |
|
| 14 | + 'mailTemplate' => __DIR__.'/../mail', |
|
| 15 | 15 | |
| 16 | 16 | // DB |
| 17 | - 'database' => require(__DIR__ . '/../config/db.php'), |
|
| 17 | + 'database' => require(__DIR__.'/../config/db.php'), |
|
| 18 | 18 | |
| 19 | 19 | // ACL |
| 20 | 20 | 'acl' => |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * specified here so can be used in the code if needs be |
| 31 | 31 | * Example: ['user' => null] |
| 32 | 32 | */ |
| 33 | - 'resources' => [ ], |
|
| 33 | + 'resources' => [], |
|
| 34 | 34 | // where we specify the guarding! |
| 35 | 35 | 'guards' => [ |
| 36 | 36 | /* |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * if included all resources default to deny unless specified. |
| 40 | 40 | * Example: ['user', ['admin']] |
| 41 | 41 | */ |
| 42 | - 'resources' => [ ], |
|
| 42 | + 'resources' => [], |
|
| 43 | 43 | /* |
| 44 | 44 | * list of literal routes for guarding. |
| 45 | 45 | * optional |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | * ['route', ['roles'], ['methods',' methods1']] |
| 49 | 49 | */ |
| 50 | 50 | 'routes' => [ |
| 51 | - ['/api/token', ['guest'], ['post']], |
|
| 52 | - ['/api/user', ['user'], ['get']], |
|
| 51 | + ['/api/token', ['guest'], ['post']], |
|
| 52 | + ['/api/user', ['user'], ['get']], |
|
| 53 | 53 | ], |
| 54 | 54 | /* |
| 55 | 55 | * list of callables to resolve against |
@@ -59,27 +59,27 @@ discard block |
||
| 59 | 59 | * ['callable', ['roles']] |
| 60 | 60 | */ |
| 61 | 61 | 'callables' => [ |
| 62 | - ['App\Controller\CrudController', ['user']], |
|
| 63 | - ['App\Controller\CrudController:actionIndex', ['user']], |
|
| 64 | - ['App\Controller\CrudController:actionGet', ['user']], |
|
| 65 | - ['App\Controller\CrudController:actionCreate', ['user']], |
|
| 66 | - ['App\Controller\CrudController:actionUpdate', ['user']], |
|
| 67 | - ['App\Controller\CrudController:actionDelete', ['user']], |
|
| 62 | + ['App\Controller\CrudController', ['user']], |
|
| 63 | + ['App\Controller\CrudController:actionIndex', ['user']], |
|
| 64 | + ['App\Controller\CrudController:actionGet', ['user']], |
|
| 65 | + ['App\Controller\CrudController:actionCreate', ['user']], |
|
| 66 | + ['App\Controller\CrudController:actionUpdate', ['user']], |
|
| 67 | + ['App\Controller\CrudController:actionDelete', ['user']], |
|
| 68 | 68 | |
| 69 | - ['App\Controller\UserController:actionIndex', ['admin']], |
|
| 70 | - ['App\Controller\UserController:actionGet', ['admin']], |
|
| 69 | + ['App\Controller\UserController:actionIndex', ['admin']], |
|
| 70 | + ['App\Controller\UserController:actionGet', ['admin']], |
|
| 71 | 71 | ['App\Controller\UserController:actionCreate', ['admin']], |
| 72 | 72 | ['App\Controller\UserController:actionUpdate', ['admin']], |
| 73 | - ['App\Controller\UserController:actionDelete', ['user']], |
|
| 73 | + ['App\Controller\UserController:actionDelete', ['user']], |
|
| 74 | 74 | ] |
| 75 | 75 | ] |
| 76 | 76 | ], |
| 77 | 77 | |
| 78 | 78 | 'translate' => [ |
| 79 | - 'path' => __DIR__ . '/../lang', |
|
| 79 | + 'path' => __DIR__.'/../lang', |
|
| 80 | 80 | 'locale' => 'ru', |
| 81 | 81 | ], |
| 82 | 82 | |
| 83 | - 'params' => require(__DIR__ . '/../config/params.php'), |
|
| 83 | + 'params' => require(__DIR__.'/../config/params.php'), |
|
| 84 | 84 | ], |
| 85 | 85 | ]; |