@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function up(): void |
13 | 13 | { |
14 | - Schema::create('abouts', function (Blueprint $table) { |
|
14 | + Schema::create('abouts', function(Blueprint $table) { |
|
15 | 15 | $table->id(); |
16 | 16 | $table->string('title'); |
17 | 17 | $table->string('slug'); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function up(): void |
13 | 13 | { |
14 | - Schema::create('sliders', function (Blueprint $table) { |
|
14 | + Schema::create('sliders', function(Blueprint $table) { |
|
15 | 15 | $table->id(); |
16 | 16 | $table->string('title')->nullable(); |
17 | 17 | $table->string('text')->nullable(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function up(): void |
13 | 13 | { |
14 | - Schema::create('histories', function (Blueprint $table) { |
|
14 | + Schema::create('histories', function(Blueprint $table) { |
|
15 | 15 | $table->id(); |
16 | 16 | $table->string('title')->nullable(); |
17 | 17 | $table->text('description')->nullable(); |
@@ -45,6 +45,6 @@ |
||
45 | 45 | Route::get('message', [\Adminetic\Website\Http\Controllers\Admin\MessageController::class, 'index'])->name('visitorMessage'); |
46 | 46 | Route::get('inquiry', [\Adminetic\Website\Http\Controllers\Admin\InquiryController::class, 'index'])->name('visitorInquiry'); |
47 | 47 | |
48 | -Route::resource('slider',\Adminetic\Website\Http\Controllers\Admin\SliderController::class); |
|
49 | -Route::resource('about',\Adminetic\Website\Http\Controllers\Admin\AboutController::class); |
|
50 | -Route::resource('history',\Adminetic\Website\Http\Controllers\Admin\HistoryController::class); |
|
48 | +Route::resource('slider', \Adminetic\Website\Http\Controllers\Admin\SliderController::class); |
|
49 | +Route::resource('about', \Adminetic\Website\Http\Controllers\Admin\AboutController::class); |
|
50 | +Route::resource('history', \Adminetic\Website\Http\Controllers\Admin\HistoryController::class); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | '1' => 'Active', |
36 | 36 | '0' => 'Inactive', |
37 | 37 | ]) |
38 | - ->filter(function (Builder $builder, string $value) { |
|
38 | + ->filter(function(Builder $builder, string $value) { |
|
39 | 39 | if ($value === '1') { |
40 | 40 | $builder->where('active', true); |
41 | 41 | } elseif ($value === '0') { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | '1' => 'Active', |
36 | 36 | '0' => 'Inactive', |
37 | 37 | ]) |
38 | - ->filter(function (Builder $builder, string $value) { |
|
38 | + ->filter(function(Builder $builder, string $value) { |
|
39 | 39 | if ($value === '1') { |
40 | 40 | $builder->where('active', true); |
41 | 41 | } elseif ($value === '0') { |
@@ -21,7 +21,7 @@ |
||
21 | 21 | protected function prepareForValidation(): void |
22 | 22 | { |
23 | 23 | $this->merge([ |
24 | - 'slug' => ! is_null($this->title) ? Str::slug($this->title) : null, |
|
24 | + 'slug' => !is_null($this->title) ? Str::slug($this->title) : null, |
|
25 | 25 | 'meta_name' => $this->process->meta_name ?? $this->meta_name ?? $this->title ?? null, |
26 | 26 | 'meta_description' => $this->process->meta_description ?? $this->meta_description ?? $this->excerpt ?? null, |
27 | 27 | ]); |
@@ -74,9 +74,9 @@ |
||
74 | 74 | return $qry->where('active', 1); |
75 | 75 | } |
76 | 76 | |
77 | - // Accessors |
|
78 | - public function getImageAttribute() |
|
79 | - { |
|
80 | - return ! is_null($this->getFirstMedia('image')) ? $this->getFirstMediaUrl('image') : asset('adminetic/static/slider.jpg'); |
|
81 | - } |
|
77 | + // Accessors |
|
78 | + public function getImageAttribute() |
|
79 | + { |
|
80 | + return ! is_null($this->getFirstMedia('image')) ? $this->getFirstMediaUrl('image') : asset('adminetic/static/slider.jpg'); |
|
81 | + } |
|
82 | 82 | } |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | { |
21 | 21 | parent::boot(); |
22 | 22 | |
23 | - static::saving(function () { |
|
23 | + static::saving(function() { |
|
24 | 24 | self::cacheKey(); |
25 | 25 | }); |
26 | 26 | |
27 | - static::deleting(function () { |
|
27 | + static::deleting(function() { |
|
28 | 28 | self::cacheKey(); |
29 | 29 | }); |
30 | 30 | } |
@@ -77,6 +77,6 @@ discard block |
||
77 | 77 | // Accessors |
78 | 78 | public function getImageAttribute() |
79 | 79 | { |
80 | - return ! is_null($this->getFirstMedia('image')) ? $this->getFirstMediaUrl('image') : asset('adminetic/static/slider.jpg'); |
|
80 | + return !is_null($this->getFirstMedia('image')) ? $this->getFirstMediaUrl('image') : asset('adminetic/static/slider.jpg'); |
|
81 | 81 | } |
82 | 82 | } |
@@ -42,14 +42,14 @@ |
||
42 | 42 | { |
43 | 43 | return LogOptions::defaults(); |
44 | 44 | } |
45 | - // Accessors |
|
46 | - public function getImageAttribute() |
|
47 | - { |
|
48 | - return ! is_null($this->getFirstMedia('image')) ? $this->getFirstMediaUrl('image') : asset('adminetic/static/placeholder.jpg'); |
|
49 | - } |
|
50 | - |
|
51 | - public function scopeActive($qry) |
|
52 | - { |
|
53 | - return $qry->where('active', 1); |
|
54 | - } |
|
45 | + // Accessors |
|
46 | + public function getImageAttribute() |
|
47 | + { |
|
48 | + return ! is_null($this->getFirstMedia('image')) ? $this->getFirstMediaUrl('image') : asset('adminetic/static/placeholder.jpg'); |
|
49 | + } |
|
50 | + |
|
51 | + public function scopeActive($qry) |
|
52 | + { |
|
53 | + return $qry->where('active', 1); |
|
54 | + } |
|
55 | 55 | } |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | { |
21 | 21 | parent::boot(); |
22 | 22 | |
23 | - static::saving(function () { |
|
23 | + static::saving(function() { |
|
24 | 24 | self::cacheKey(); |
25 | 25 | }); |
26 | 26 | |
27 | - static::deleting(function () { |
|
27 | + static::deleting(function() { |
|
28 | 28 | self::cacheKey(); |
29 | 29 | }); |
30 | 30 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // Accessors |
46 | 46 | public function getImageAttribute() |
47 | 47 | { |
48 | - return ! is_null($this->getFirstMedia('image')) ? $this->getFirstMediaUrl('image') : asset('adminetic/static/placeholder.jpg'); |
|
48 | + return !is_null($this->getFirstMedia('image')) ? $this->getFirstMediaUrl('image') : asset('adminetic/static/placeholder.jpg'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function scopeActive($qry) |