@@ -83,7 +83,7 @@ |
||
83 | 83 | */ |
84 | 84 | public function addRoutes(Router $router): void |
85 | 85 | { |
86 | - $router->group('/users', function (Router $router) { |
|
86 | + $router->group('/users', function(Router $router) { |
|
87 | 87 | $router->get('', ListAction::class, 'user_list', ['permission' => 'view_user']); |
88 | 88 | $router->get('/detail/{id:i}', DetailAction::class, 'user_detail'); |
89 | 89 | $router->post('/batch', BatchAction::class, 'user_batch'); |
@@ -79,8 +79,8 @@ |
||
79 | 79 | foreach ($pages as $page) { |
80 | 80 | if ($page->getUrl() !== null) { |
81 | 81 | $html .= '<li class = "page-item' . ($page->isCurrent() ? ' active"' : '"') |
82 | - . '><a href = "' . $page->getUrl() . '" class="page-link">' |
|
83 | - . $page->getNumber() . '</a></li>'; |
|
82 | + . '><a href = "' . $page->getUrl() . '" class="page-link">' |
|
83 | + . $page->getNumber() . '</a></li>'; |
|
84 | 84 | } else { |
85 | 85 | $html .= '<li class = "page-item disabled"><a href="#" class="page-link">' |
86 | 86 | . $page->getNumber() . '</a></li>'; |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * @class BootstrapRenderer |
55 | 55 | * @package Platine\Framework\Pagination |
56 | 56 | */ |
57 | -class BootstrapRenderer implements RendererInterface |
|
58 | -{ |
|
57 | +class BootstrapRenderer implements RendererInterface { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * {@inheritdoc} |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * @class ServerRequestUrlGenerator |
55 | 55 | * @package Platine\Framework\Pagination |
56 | 56 | */ |
57 | -class ServerRequestUrlGenerator implements UrlGeneratorInterface |
|
58 | -{ |
|
57 | +class ServerRequestUrlGenerator implements UrlGeneratorInterface { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * The server request instance |
@@ -80,8 +79,7 @@ discard block |
||
80 | 79 | * @param ServerRequestInterface $request |
81 | 80 | * @param string $queryName |
82 | 81 | */ |
83 | - public function __construct(ServerRequestInterface $request, string $queryName) |
|
84 | - { |
|
82 | + public function __construct(ServerRequestInterface $request, string $queryName) { |
|
85 | 83 | $this->request = $request; |
86 | 84 | $this->queryVarName = $queryName; |
87 | 85 |
@@ -10,46 +10,46 @@ discard block |
||
10 | 10 | |
11 | 11 | public function up(): void |
12 | 12 | { |
13 | - //Action when migrate up |
|
13 | + //Action when migrate up |
|
14 | 14 | $this->create('users', function (CreateTable $table) { |
15 | 15 | $table->integer('id') |
16 | - ->autoincrement() |
|
17 | - ->primary(); |
|
16 | + ->autoincrement() |
|
17 | + ->primary(); |
|
18 | 18 | |
19 | 19 | $table->string('username') |
20 | - ->description('The user username') |
|
21 | - ->unique() |
|
22 | - ->notNull(); |
|
20 | + ->description('The user username') |
|
21 | + ->unique() |
|
22 | + ->notNull(); |
|
23 | 23 | |
24 | 24 | $table->string('email') |
25 | - ->description('The user email') |
|
26 | - ->unique() |
|
27 | - ->notNull(); |
|
25 | + ->description('The user email') |
|
26 | + ->unique() |
|
27 | + ->notNull(); |
|
28 | 28 | |
29 | 29 | $table->string('password') |
30 | - ->description('The user password') |
|
31 | - ->notNull(); |
|
30 | + ->description('The user password') |
|
31 | + ->notNull(); |
|
32 | 32 | |
33 | 33 | $table->fixed('status', 1) |
34 | - ->description('The user status, A=Active, D=Deactive') |
|
35 | - ->defaultValue('D'); |
|
34 | + ->description('The user status, A=Active, D=Deactive') |
|
35 | + ->defaultValue('D'); |
|
36 | 36 | |
37 | 37 | $table->integer('age') |
38 | - ->size('tiny') |
|
39 | - ->description('The user age'); |
|
38 | + ->size('tiny') |
|
39 | + ->description('The user age'); |
|
40 | 40 | |
41 | 41 | $table->string('lastname') |
42 | - ->description('The user lastname'); |
|
42 | + ->description('The user lastname'); |
|
43 | 43 | |
44 | 44 | $table->string('firstname') |
45 | - ->description('The user firstname'); |
|
45 | + ->description('The user firstname'); |
|
46 | 46 | |
47 | 47 | $table->datetime('created_at') |
48 | - ->description('created date') |
|
49 | - ->notNull(); |
|
48 | + ->description('created date') |
|
49 | + ->notNull(); |
|
50 | 50 | |
51 | 51 | $table->datetime('updated_at') |
52 | - ->description('last updated date'); |
|
52 | + ->description('last updated date'); |
|
53 | 53 | |
54 | 54 | $table->engine('INNODB'); |
55 | 55 | }); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | public function down(): void |
59 | 59 | { |
60 | - //Action when migrate down |
|
60 | + //Action when migrate down |
|
61 | 61 | $this->drop('users'); |
62 | 62 | } |
63 | 63 | } |