@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | {
|
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('roles', function (CreateTable $table) {
|
|
| 13 | + $this->create('roles', function(CreateTable $table) {
|
|
| 14 | 14 | $table->integer('id')
|
| 15 | 15 | ->autoincrement() |
| 16 | 16 | ->primary(); |
@@ -5,12 +5,11 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddRolesTable20210705065247 extends AbstractMigration |
|
| 9 | -{
|
|
| 8 | +class AddRolesTable20210705065247 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | {
|
| 12 | 11 | //Action when migrate up |
| 13 | - $this->create('roles', function (CreateTable $table) {
|
|
| 12 | + $this->create('roles', function (CreateTable $table) { |
|
| 14 | 13 | $table->integer('id')
|
| 15 | 14 | ->autoincrement() |
| 16 | 15 | ->primary(); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | {
|
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('users', function (CreateTable $table) {
|
|
| 13 | + $this->create('users', function(CreateTable $table) {
|
|
| 14 | 14 | $table->integer('id')
|
| 15 | 15 | ->autoincrement() |
| 16 | 16 | ->primary(); |
@@ -5,12 +5,11 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddUsersTable20210705065248 extends AbstractMigration |
|
| 9 | -{
|
|
| 8 | +class AddUsersTable20210705065248 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | {
|
| 12 | 11 | //Action when migrate up |
| 13 | - $this->create('users', function (CreateTable $table) {
|
|
| 12 | + $this->create('users', function (CreateTable $table) { |
|
| 14 | 13 | $table->integer('id')
|
| 15 | 14 | ->autoincrement() |
| 16 | 15 | ->primary(); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | {
|
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('permissions_roles', function (CreateTable $table) {
|
|
| 13 | + $this->create('permissions_roles', function(CreateTable $table) {
|
|
| 14 | 14 | $table->integer('permission_id');
|
| 15 | 15 | $table->integer('role_id');
|
| 16 | 16 | |
@@ -5,12 +5,11 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddPermissionRolesTable20210717094822 extends AbstractMigration |
|
| 9 | -{
|
|
| 8 | +class AddPermissionRolesTable20210717094822 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | {
|
| 12 | 11 | //Action when migrate up |
| 13 | - $this->create('permissions_roles', function (CreateTable $table) {
|
|
| 12 | + $this->create('permissions_roles', function (CreateTable $table) { |
|
| 14 | 13 | $table->integer('permission_id');
|
| 15 | 14 | $table->integer('role_id');
|
| 16 | 15 | |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | {
|
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('permissions', function (CreateTable $table) {
|
|
| 13 | + $this->create('permissions', function(CreateTable $table) {
|
|
| 14 | 14 | $table->integer('id')
|
| 15 | 15 | ->autoincrement() |
| 16 | 16 | ->primary(); |
@@ -5,12 +5,11 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddPermissionsTable20210717094547 extends AbstractMigration |
|
| 9 | -{
|
|
| 8 | +class AddPermissionsTable20210717094547 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | {
|
| 12 | 11 | //Action when migrate up |
| 13 | - $this->create('permissions', function (CreateTable $table) {
|
|
| 12 | + $this->create('permissions', function (CreateTable $table) { |
|
| 14 | 13 | $table->integer('id')
|
| 15 | 14 | ->autoincrement() |
| 16 | 15 | ->primary(); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | {
|
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('roles_users', function (CreateTable $table) {
|
|
| 13 | + $this->create('roles_users', function(CreateTable $table) {
|
|
| 14 | 14 | $table->integer('user_id');
|
| 15 | 15 | $table->integer('role_id');
|
| 16 | 16 | |
@@ -5,12 +5,11 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddRoleUsersTable20210717100434 extends AbstractMigration |
|
| 9 | -{
|
|
| 8 | +class AddRoleUsersTable20210717100434 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | {
|
| 12 | 11 | //Action when migrate up |
| 13 | - $this->create('roles_users', function (CreateTable $table) {
|
|
| 12 | + $this->create('roles_users', function (CreateTable $table) { |
|
| 14 | 13 | $table->integer('user_id');
|
| 15 | 14 | $table->integer('role_id');
|
| 16 | 15 | |
@@ -12,8 +12,7 @@ |
||
| 12 | 12 | * @package Platine\App\Param |
| 13 | 13 | * @template TEntity as Entity |
| 14 | 14 | */ |
| 15 | -class PermissionParam extends BaseParam |
|
| 16 | -{ |
|
| 15 | +class PermissionParam extends BaseParam { |
|
| 17 | 16 | /** |
| 18 | 17 | * The code field |
| 19 | 18 | * @var string |
@@ -11,8 +11,7 @@ |
||
| 11 | 11 | * @package Platine\App\Param |
| 12 | 12 | * |
| 13 | 13 | */ |
| 14 | -class AuthParam extends BaseParam |
|
| 15 | -{ |
|
| 14 | +class AuthParam extends BaseParam { |
|
| 16 | 15 | /** |
| 17 | 16 | * The username field |
| 18 | 17 | * @var string |
@@ -12,8 +12,7 @@ |
||
| 12 | 12 | * @package Platine\App\Param |
| 13 | 13 | * @template TEntity as Entity |
| 14 | 14 | */ |
| 15 | -class RoleParam extends BaseParam |
|
| 16 | -{ |
|
| 15 | +class RoleParam extends BaseParam { |
|
| 17 | 16 | /** |
| 18 | 17 | * The name field |
| 19 | 18 | * @var string |
@@ -15,8 +15,7 @@ |
||
| 15 | 15 | * @class UserServiceProvider |
| 16 | 16 | * @package Platine\App\Provider |
| 17 | 17 | */ |
| 18 | -class UserServiceProvider extends ServiceProvider |
|
| 19 | -{ |
|
| 18 | +class UserServiceProvider extends ServiceProvider { |
|
| 20 | 19 | /** |
| 21 | 20 | * {@inheritdoc} |
| 22 | 21 | */ |
@@ -43,12 +43,12 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function addRoutes(Router $router): void |
| 45 | 45 | { |
| 46 | - $router->group('/user', function (Router $router) { |
|
| 46 | + $router->group('/user', function(Router $router) { |
|
| 47 | 47 | $router->add('/login', AuthAction::class, ['GET', 'POST'], 'user_login'); |
| 48 | 48 | $router->get('/logout', LogoutAction::class, 'user_logout'); |
| 49 | 49 | $router->resource('', UserAction::class, 'user'); |
| 50 | 50 | |
| 51 | - $router->group('/profile', function (Router $router) { |
|
| 51 | + $router->group('/profile', function(Router $router) { |
|
| 52 | 52 | $router->get('', sprintf('%s@detail', UserProfileAction::class), 'user_profile'); |
| 53 | 53 | $router->add( |
| 54 | 54 | '/update', |