@@ -45,10 +45,10 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | public function getModule($name) { |
48 | - if(isset($this->modules[$name])) |
|
48 | + if (isset($this->modules[$name])) |
|
49 | 49 | return $this->modules[$name]; |
50 | 50 | else |
51 | - throw new \Exception("Module '". $name. "' not found"); |
|
51 | + throw new \Exception("Module '".$name."' not found"); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | protected function getModulesRecursive($moduleName, $moduleData) { |
@@ -45,10 +45,11 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | public function getModule($name) { |
48 | - if(isset($this->modules[$name])) |
|
49 | - return $this->modules[$name]; |
|
50 | - else |
|
51 | - throw new \Exception("Module '". $name. "' not found"); |
|
48 | + if(isset($this->modules[$name])) { |
|
49 | + return $this->modules[$name]; |
|
50 | + } else { |
|
51 | + throw new \Exception("Module '". $name. "' not found"); |
|
52 | + } |
|
52 | 53 | } |
53 | 54 | |
54 | 55 | protected function getModulesRecursive($moduleName, $moduleData) { |
@@ -44,8 +44,9 @@ |
||
44 | 44 | $data = new TypeResolver($this->name, $column, $typeOptions); |
45 | 45 | $type = $data->getLaragenType(); |
46 | 46 | $this->columnsData[$column] = $type; |
47 | - if ($type->isDisplay()) |
|
48 | - $this->displayColumns[] = $type; |
|
47 | + if ($type->isDisplay()) { |
|
48 | + $this->displayColumns[] = $type; |
|
49 | + } |
|
49 | 50 | } |
50 | 51 | |
51 | 52 | if (sizeof($this->displayColumns) == 0) { |
@@ -8,14 +8,14 @@ |
||
8 | 8 | { |
9 | 9 | public function up() |
10 | 10 | { |
11 | - Schema::table('users', function (Blueprint $table) { |
|
11 | + Schema::table('users', function(Blueprint $table) { |
|
12 | 12 | $table->string('api_token', 60)->unique()->nullable(); |
13 | 13 | }); |
14 | 14 | } |
15 | 15 | |
16 | 16 | public function down() |
17 | 17 | { |
18 | - Schema::table('users', function (Blueprint $table) { |
|
18 | + Schema::table('users', function(Blueprint $table) { |
|
19 | 19 | $table->dropColumn(['api_token']); |
20 | 20 | }); |
21 | 21 | } |
@@ -13,8 +13,9 @@ discard block |
||
13 | 13 | public function __construct() |
14 | 14 | { |
15 | 15 | $this->middleware(function($request, $next) { |
16 | - if (!auth()->user()->getRoleNames()->contains('super-admin')) |
|
17 | - abort(403, 'Access denied'); |
|
16 | + if (!auth()->user()->getRoleNames()->contains('super-admin')) { |
|
17 | + abort(403, 'Access denied'); |
|
18 | + } |
|
18 | 19 | return $next($request); |
19 | 20 | }); |
20 | 21 | |
@@ -44,8 +45,9 @@ discard block |
||
44 | 45 | return $perm; |
45 | 46 | })->groupBy(function($perm) { |
46 | 47 | foreach (array_keys(app('laragen')->getModules()) as $module) { |
47 | - if (Str::contains($perm->name, str_replace('_', ' ', $module))) |
|
48 | - return Str::title(str_replace('_', ' ', $module)); |
|
48 | + if (Str::contains($perm->name, str_replace('_', ' ', $module))) { |
|
49 | + return Str::title(str_replace('_', ' ', $module)); |
|
50 | + } |
|
49 | 51 | } |
50 | 52 | return "Others"; |
51 | 53 | }), |
@@ -63,8 +65,9 @@ discard block |
||
63 | 65 | return $perm; |
64 | 66 | })->groupBy(function($perm) { |
65 | 67 | foreach (array_keys(app('laragen')->getModules()) as $module) { |
66 | - if (Str::contains($perm->name, str_replace('_', ' ', $module))) |
|
67 | - return Str::title(str_replace('_', ' ', $module)); |
|
68 | + if (Str::contains($perm->name, str_replace('_', ' ', $module))) { |
|
69 | + return Str::title(str_replace('_', ' ', $module)); |
|
70 | + } |
|
68 | 71 | } |
69 | 72 | return "Others"; |
70 | 73 | }), |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | protected function redirectTo($request) |
16 | 16 | { |
17 | - if (! $request->expectsJson()) { |
|
17 | + if (!$request->expectsJson()) { |
|
18 | 18 | return route('backend.login'); |
19 | 19 | } |
20 | 20 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | 'xs' => '200x200', |
32 | 32 | ], |
33 | 33 | 'events' => [ |
34 | - 'created','updated','deleted' |
|
34 | + 'created', 'updated', 'deleted' |
|
35 | 35 | ], |
36 | 36 | 'seed_rows' => 25, |
37 | 37 | 'listing_per_page' => 20, |