@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - DB::statement( "CREATE VIEW admin_count AS |
|
| 15 | + DB::statement("CREATE VIEW admin_count AS |
|
| 16 | 16 | select count(u.id) |
| 17 | 17 | from users u, groups g ,users_groups ug |
| 18 | 18 | where |
@@ -39,6 +39,6 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function down() |
| 41 | 41 | { |
| 42 | - DB::statement( "DROP VIEW IF EXISTS admin_count"); |
|
| 42 | + DB::statement("DROP VIEW IF EXISTS admin_count"); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | \ No newline at end of file |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$factory->define(App\Modules\Reporting\Report::class, function (Faker\Generator $faker) { |
|
| 3 | +$factory->define(App\Modules\Reporting\Report::class, function(Faker\Generator $faker) { |
|
| 4 | 4 | return [ |
| 5 | 5 | 'report_name' => $faker->randomElement(['Users Count', 'Low Stock Products', 'Active Users']), |
| 6 | 6 | 'view_name' => $faker->word(), |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * to preform actions like (add, edit ... etc). |
| 13 | 13 | * @var string |
| 14 | 14 | */ |
| 15 | - protected $model = 'reports'; |
|
| 15 | + protected $model = 'reports'; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * List of all route actions that the base api controller |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | \ErrorHandler::notFound('report'); |
| 42 | 42 | } |
| 43 | - else if (! $skipPermission && ! \Core::users()->can($report->view_name, 'reports')) |
|
| 43 | + else if ( ! $skipPermission && ! \Core::users()->can($report->view_name, 'reports')) |
|
| 44 | 44 | { |
| 45 | 45 | \ErrorHandler::noPermissions(); |
| 46 | 46 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | Route::group([ |
| 55 | 55 | 'middleware' => 'web', |
| 56 | 56 | 'namespace' => $this->namespace, |
| 57 | - ], function ($router) { |
|
| 57 | + ], function($router) { |
|
| 58 | 58 | require module_path('notifications', 'Routes/web.php'); |
| 59 | 59 | }); |
| 60 | 60 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | 'middleware' => 'api', |
| 73 | 73 | 'namespace' => $this->namespace, |
| 74 | 74 | 'prefix' => 'api', |
| 75 | - ], function ($router) { |
|
| 75 | + ], function($router) { |
|
| 76 | 76 | require module_path('notifications', 'Routes/api.php'); |
| 77 | 77 | }); |
| 78 | 78 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | /** |
| 22 | 22 | * Assign the permissions to the admin group. |
| 23 | 23 | */ |
| 24 | - \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function ($permission) use ($adminGroupId) { |
|
| 24 | + \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function($permission) use ($adminGroupId) { |
|
| 25 | 25 | \DB::table('groups_permissions')->insert( |
| 26 | 26 | [ |
| 27 | 27 | 'permission_id' => $permission->id, |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function run() |
| 15 | 15 | { |
| 16 | - $permissions = \DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
| 16 | + $permissions = \DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
| 17 | 17 | \DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
| 18 | 18 | $permissions->delete(); |
| 19 | 19 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('notifications', function (Blueprint $table) { |
|
| 16 | + Schema::create('notifications', function(Blueprint $table) { |
|
| 17 | 17 | $table->uuid('id')->primary(); |
| 18 | 18 | $table->string('type'); |
| 19 | 19 | $table->morphs('notifiable'); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('jobs', function (Blueprint $table) { |
|
| 16 | + Schema::create('jobs', function(Blueprint $table) { |
|
| 17 | 17 | $table->bigIncrements('id'); |
| 18 | 18 | $table->string('queue'); |
| 19 | 19 | $table->longText('payload'); |