@@ -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(); |
@@ -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(); |
@@ -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 | |
@@ -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(); |
@@ -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 | |
@@ -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', |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('product_categories', function (CreateTable $table) { |
|
| 15 | + $this->create('product_categories', function(CreateTable $table) { |
|
| 16 | 16 | $table->integer('id') |
| 17 | 17 | ->autoincrement() |
| 18 | 18 | ->primary(); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('products', function (CreateTable $table) { |
|
| 15 | + $this->create('products', function(CreateTable $table) { |
|
| 16 | 16 | $table->integer('id') |
| 17 | 17 | ->autoincrement() |
| 18 | 18 | ->primary(); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function addRoutes(Router $router): void |
| 37 | 37 | { |
| 38 | - $router->group('/product', function (Router $router) { |
|
| 38 | + $router->group('/product', function(Router $router) { |
|
| 39 | 39 | $router->resource('', ProductAction::class, 'product'); |
| 40 | 40 | $router->resource('/category', CategoryAction::class, 'product_category'); |
| 41 | 41 | }); |