@@ -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 | - Testimonial::creating(function ($model) { |
|
| 28 | + Testimonial::creating(function($model) { |
|
| 29 | 29 | $model->position = Testimonial::max('position') + 1; |
| 30 | 30 | }); |
| 31 | 31 | } |
@@ -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 | - Package::creating(function ($model) { |
|
| 28 | + Package::creating(function($model) { |
|
| 29 | 29 | $model->position = Package::max('position') + 1; |
| 30 | 30 | }); |
| 31 | 31 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('testimonials', function (Blueprint $table) { |
|
| 16 | + Schema::create('testimonials', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->string('code')->unique(); |
| 19 | 19 | $table->string('name'); |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | public function indexTestimonial() |
| 15 | 15 | { |
| 16 | 16 | $testimonials = config('adminetic.caching', true) |
| 17 | - ? (Cache::has('testimonials') ? Cache::get('testimonials') : Cache::rememberForever('testimonials', function () { |
|
| 17 | + ? (Cache::has('testimonials') ? Cache::get('testimonials') : Cache::rememberForever('testimonials', function() { |
|
| 18 | 18 | return Testimonial::orderBy('position')->get(); |
| 19 | 19 | })) |
| 20 | 20 | : Testimonial::orderBy('position')->get(); |
@@ -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('type'); |
@@ -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(); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | 'image' => request()->image->store('website/block', 'public'), |
| 80 | 80 | ]); |
| 81 | 81 | $image = Image::make(request()->file('image')->getRealPath()); |
| 82 | - $image->save(public_path('storage/' . $block->image)); |
|
| 82 | + $image->save(public_path('storage/'.$block->image)); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
@@ -39,9 +39,9 @@ |
||
| 39 | 39 | $id = $this->block->id ?? ''; |
| 40 | 40 | |
| 41 | 41 | return [ |
| 42 | - 'code' => 'required|max:255|unique:blocks,code,' . $id, |
|
| 42 | + 'code' => 'required|max:255|unique:blocks,code,'.$id, |
|
| 43 | 43 | 'type' => 'required|max:255', |
| 44 | - 'name' => 'required|max:255|unique:blocks,name,' . $id, |
|
| 44 | + 'name' => 'required|max:255|unique:blocks,name,'.$id, |
|
| 45 | 45 | 'image' => 'nullable|file|image|max:3000', |
| 46 | 46 | 'version' => 'required|numeric|max:60', |
| 47 | 47 | 'theme' => 'nullable|numeric|max:60', |