@@ -120,15 +120,15 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | // Publish Config File |
| 122 | 122 | $this->publishes([ |
| 123 | - __DIR__ . '/../../config/website.php' => config_path('website.php'), |
|
| 123 | + __DIR__.'/../../config/website.php' => config_path('website.php'), |
|
| 124 | 124 | ], 'website-config'); |
| 125 | 125 | // Publish View Files |
| 126 | 126 | $this->publishes([ |
| 127 | - __DIR__ . '/../../resources/views' => resource_path('views/vendor/adminetic/plugin/website'), |
|
| 127 | + __DIR__.'/../../resources/views' => resource_path('views/vendor/adminetic/plugin/website'), |
|
| 128 | 128 | ], 'website-views'); |
| 129 | 129 | // Publish Migration Files |
| 130 | 130 | $this->publishes([ |
| 131 | - __DIR__ . '/../../database/migrations' => database_path('migrations'), |
|
| 131 | + __DIR__.'/../../database/migrations' => database_path('migrations'), |
|
| 132 | 132 | ], 'website-migrations'); |
| 133 | 133 | } |
| 134 | 134 | |
@@ -139,8 +139,8 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | protected function registerResource() |
| 141 | 141 | { |
| 142 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); // Loading Migration Files |
|
| 143 | - $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'website'); // Loading Views Files |
|
| 142 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); // Loading Migration Files |
|
| 143 | + $this->loadViewsFrom(__DIR__.'/../../resources/views', 'website'); // Loading Views Files |
|
| 144 | 144 | $this->registerRoutes(); |
| 145 | 145 | } |
| 146 | 146 | |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | */ |
| 164 | 164 | protected function registerRoutes() |
| 165 | 165 | { |
| 166 | - Route::group($this->routeConfiguration(), function () { |
|
| 167 | - $this->loadRoutesFrom(__DIR__ . '/../../routes/web.php'); |
|
| 166 | + Route::group($this->routeConfiguration(), function() { |
|
| 167 | + $this->loadRoutesFrom(__DIR__.'/../../routes/web.php'); |
|
| 168 | 168 | }); |
| 169 | 169 | } |
| 170 | 170 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('blocks', function (Blueprint $table) { |
|
| 16 | + Schema::create('blocks', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->string('code')->unique(); |
| 19 | 19 | $table->string('name')->unique(); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | public function indexBlock() |
| 15 | 15 | { |
| 16 | 16 | $blocks = config('adminetic.caching', true) |
| 17 | - ? (Cache::has('blocks') ? Cache::get('blocks') : Cache::rememberForever('blocks', function () { |
|
| 17 | + ? (Cache::has('blocks') ? Cache::get('blocks') : Cache::rememberForever('blocks', function() { |
|
| 18 | 18 | return Block::orderBy('position')->get(); |
| 19 | 19 | })) |
| 20 | 20 | : Block::orderBy('position')->get(); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | 'image' => request()->image->store('website/block', 'public'), |
| 69 | 69 | ]); |
| 70 | 70 | $image = Image::make(request()->file('image')->getRealPath()); |
| 71 | - $image->save(public_path('storage/' . $block->image)); |
|
| 71 | + $image->save(public_path('storage/'.$block->image)); |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | } |
@@ -37,8 +37,8 @@ |
||
| 37 | 37 | { |
| 38 | 38 | $id = $this->block->id ?? ''; |
| 39 | 39 | return [ |
| 40 | - 'code' => 'required|max:255|unique:blocks,code,' . $id, |
|
| 41 | - 'name' => 'required|max:255|unique:blocks,name,' . $id, |
|
| 40 | + 'code' => 'required|max:255|unique:blocks,code,'.$id, |
|
| 41 | + 'name' => 'required|max:255|unique:blocks,name,'.$id, |
|
| 42 | 42 | 'image' => 'nullable|file|image|max:3000', |
| 43 | 43 | 'page' => 'nullable|max:255', |
| 44 | 44 | 'location' => 'required|max:255', |
@@ -17,15 +17,15 @@ |
||
| 17 | 17 | { |
| 18 | 18 | parent::boot(); |
| 19 | 19 | |
| 20 | - static::saving(function () { |
|
| 20 | + static::saving(function() { |
|
| 21 | 21 | self::cacheKey(); |
| 22 | 22 | }); |
| 23 | 23 | |
| 24 | - static::deleting(function () { |
|
| 24 | + static::deleting(function() { |
|
| 25 | 25 | self::cacheKey(); |
| 26 | 26 | }); |
| 27 | 27 | |
| 28 | - Block::creating(function ($model) { |
|
| 28 | + Block::creating(function($model) { |
|
| 29 | 29 | $model->position = Block::max('position') + 1; |
| 30 | 30 | }); |
| 31 | 31 | } |