From bf885d6b4dc1c607729ff32b219aecaaaa24217b Mon Sep 17 00:00:00 2001 From: tanch0 Date: Thu, 9 May 2024 16:50:06 +0545 Subject: [PATCH] Updated --- app/Models/Franchises.php | 6 ++++++ app/Models/Services.php | 5 +++++ .../topCargo/partials/welcome/news.blade.php | 4 ++-- .../topCargo/partials/welcome/slider.blade.php | 18 ++++++++---------- storage/logs/laravel.log | 1 + 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/app/Models/Franchises.php b/app/Models/Franchises.php index 868451b..7bb723e 100644 --- a/app/Models/Franchises.php +++ b/app/Models/Franchises.php @@ -6,6 +6,7 @@ use App\Models\User; use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use App\Models\Scopes\StatusScope; use App\Traits\CreatedUpdatedBy; class Franchises extends Model @@ -50,4 +51,9 @@ class Franchises extends Model get: fn ($value) => User::find($value) ? User::find($value)->name : '', ); } + public static function boot(){ + parent::boot(); + static::addGlobalScope(new StatusScope()); + } + } diff --git a/app/Models/Services.php b/app/Models/Services.php index 98d38d4..bda8619 100644 --- a/app/Models/Services.php +++ b/app/Models/Services.php @@ -2,6 +2,7 @@ namespace App\Models; use App\Models\User; +use App\Models\Scopes\StatusScope; use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; @@ -59,4 +60,8 @@ class Services extends Model public function parent(){ return $this->belongsTo(Services::class,'parent_service'); } + public static function boot(){ + parent::boot(); + static::addGlobalScope(new StatusScope()); + } } \ No newline at end of file diff --git a/resources/views/client/topCargo/partials/welcome/news.blade.php b/resources/views/client/topCargo/partials/welcome/news.blade.php index edc63a7..81eca31 100644 --- a/resources/views/client/topCargo/partials/welcome/news.blade.php +++ b/resources/views/client/topCargo/partials/welcome/news.blade.php @@ -9,14 +9,14 @@ @forelse ($news as $item)
- + {{$item->title}}

{{ Str::limit($item->title,45) }}

diff --git a/resources/views/client/topCargo/partials/welcome/slider.blade.php b/resources/views/client/topCargo/partials/welcome/slider.blade.php index 29b599d..2688fc6 100644 --- a/resources/views/client/topCargo/partials/welcome/slider.blade.php +++ b/resources/views/client/topCargo/partials/welcome/slider.blade.php @@ -18,7 +18,7 @@ -
@@ -39,16 +39,14 @@
- - + data-paddingleft="[0,0,0,0]" + style="z-index: 8; letter-spacing: 0px; width: 250%; "> {{ $slider->slider_title }}
@@ -56,15 +54,15 @@
+ style="z-index: 8; width: 30em; letter-spacing: 0px;word-break:break-all;"> {{ $slider->slider_desc }}
diff --git a/storage/logs/laravel.log b/storage/logs/laravel.log index ded15a3..75c583a 100644 --- a/storage/logs/laravel.log +++ b/storage/logs/laravel.log @@ -31577,3 +31577,4 @@ The event was not just about a flight taking off; it symbolized a journey of pro #53 /Applications/XAMPP/xamppfiles/htdocs/Cargo_CMS/server.php(21): require_once('/Applications/X...') #54 {main} "} +[2024-05-09 09:59:22] local.INFO: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'slider_desc' at row 1 (Connection: mysql, SQL: update `tbl_sliders` set `slider_desc` = if a list-style-image is specified, the value of this property will be displayed if the image for some reason cannot be displayedif a list-style-image is specified, the value of this property will be displayed if the image for some reason cannot be displayed, `updatedBy` = 1, `tbl_sliders`.`updated_at` = 2024-05-09 09:59:22 where `slider_id` = 12)