@@ -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(), |
@@ -18,7 +18,7 @@ |
||
18 | 18 | /** |
19 | 19 | * Assign the permissions to the admin group. |
20 | 20 | */ |
21 | - \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['reports'])->each(function ($permission) use ($adminGroupId) { |
|
21 | + \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['reports'])->each(function($permission) use ($adminGroupId) { |
|
22 | 22 | \DB::table('groups_permissions')->insert( |
23 | 23 | [ |
24 | 24 | 'permission_id' => $permission->id, |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function run() |
15 | 15 | { |
16 | - $permissions = \DB::table('permissions')->whereIn('model', ['reports']); |
|
16 | + $permissions = \DB::table('permissions')->whereIn('model', ['reports']); |
|
17 | 17 | \DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
18 | 18 | $permissions->delete(); |
19 | 19 | } |
@@ -12,10 +12,10 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('reports', function (Blueprint $table) { |
|
15 | + Schema::create('reports', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | - $table->string('report_name',100); |
|
18 | - $table->string('view_name',100); |
|
17 | + $table->string('report_name', 100); |
|
18 | + $table->string('view_name', 100); |
|
19 | 19 | $table->softDeletes(); |
20 | 20 | $table->timestamps(); |
21 | 21 | }); |
@@ -80,7 +80,7 @@ |
||
80 | 80 | if ($this->cacheConfig && $this->cacheConfig == 'cache') |
81 | 81 | { |
82 | 82 | $page = \Request::get('page') !== null ? \Request::get('page') : '1'; |
83 | - $cacheKey = $name . $page . \Session::get('locale') . serialize($arguments); |
|
83 | + $cacheKey = $name.$page.\Session::get('locale').serialize($arguments); |
|
84 | 84 | return $this->cache->tags([$this->cacheTag])->rememberForever($cacheKey, function() use ($arguments, $name) { |
85 | 85 | return call_user_func_array([$this->repo, $name], $arguments); |
86 | 86 | }); |
@@ -84,8 +84,7 @@ discard block |
||
84 | 84 | return $this->cache->tags([$this->cacheTag])->rememberForever($cacheKey, function() use ($arguments, $name) { |
85 | 85 | return call_user_func_array([$this->repo, $name], $arguments); |
86 | 86 | }); |
87 | - } |
|
88 | - else if ($this->cacheConfig) |
|
87 | + } else if ($this->cacheConfig) |
|
89 | 88 | { |
90 | 89 | $this->cache->tags($this->cacheConfig)->flush(); |
91 | 90 | return call_user_func_array([$this->repo, $name], $arguments); |
@@ -109,8 +108,7 @@ discard block |
||
109 | 108 | if ($cacheConfig && in_array($name, $cacheConfig['cache'])) |
110 | 109 | { |
111 | 110 | $this->cacheConfig = 'cache'; |
112 | - } |
|
113 | - else if ($cacheConfig && isset($cacheConfig['clear'][$name])) |
|
111 | + } else if ($cacheConfig && isset($cacheConfig['clear'][$name])) |
|
114 | 112 | { |
115 | 113 | $this->cacheConfig = $cacheConfig['clear'][$name]; |
116 | 114 | } |
@@ -3,14 +3,14 @@ |
||
3 | 3 | use Illuminate\Database\Eloquent\Model; |
4 | 4 | use Illuminate\Database\Eloquent\SoftDeletes; |
5 | 5 | |
6 | -class Settings extends Model{ |
|
6 | +class Settings extends Model { |
|
7 | 7 | |
8 | 8 | use SoftDeletes; |
9 | 9 | protected $table = 'settings'; |
10 | 10 | protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
11 | 11 | protected $hidden = ['deleted_at']; |
12 | 12 | protected $guarded = ['id', 'key']; |
13 | - protected $fillable = ['name','value']; |
|
13 | + protected $fillable = ['name', 'value']; |
|
14 | 14 | public $searchable = ['name', 'value', 'key']; |
15 | 15 | |
16 | 16 | public function getCreatedAtAttribute($value) |
@@ -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('core', '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('core', 'Routes/api.php'); |
77 | 77 | }); |
78 | 78 | } |
@@ -18,10 +18,10 @@ |
||
18 | 18 | { |
19 | 19 | foreach ($this->getRepoNameSpace() as $repoNameSpace) |
20 | 20 | { |
21 | - $class = rtrim($repoNameSpace, '\\') . '\\' . ucfirst(str_singular($name)) . 'Repository'; |
|
21 | + $class = rtrim($repoNameSpace, '\\').'\\'.ucfirst(str_singular($name)).'Repository'; |
|
22 | 22 | if (class_exists($class)) |
23 | 23 | { |
24 | - \App::singleton($class, function ($app) use ($class) { |
|
24 | + \App::singleton($class, function($app) use ($class) { |
|
25 | 25 | |
26 | 26 | return new \App\Modules\Core\Decorators\CachingDecorator(new $class, $app['cache.store']); |
27 | 27 | }); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function saveMany(array $data) |
24 | 24 | { |
25 | - \DB::transaction(function () use ($data) { |
|
25 | + \DB::transaction(function() use ($data) { |
|
26 | 26 | foreach ($data as $key => $value) |
27 | 27 | { |
28 | 28 | $this->save($value); |