Put back site_id middleware

This commit is contained in:
2024-07-23 15:05:56 +10:00
parent c91a2fa8e5
commit 45794ff109
5 changed files with 15 additions and 21 deletions

View File

@@ -6,9 +6,11 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
use Leenooks\Traits\CompositeKeys;
use App\Traits\SiteID;
class SiteDetail extends Model
{
use CompositeKeys;
use CompositeKeys,SiteID;
protected $casts = [
'social' => 'array',
@@ -55,13 +57,6 @@ class SiteDetail extends Model
public $timestamps = FALSE;
/* RELATIONS */
public function site()
{
return $this->belongsTo(Site::class);
}
/* ATTRIBUTES */
/**
@@ -82,12 +77,11 @@ class SiteDetail extends Model
/**
* Set our value, casting it if required
*
* @param $key
* @param $value
* @return string
* @return void
* @throws \Exception
*/
public function setValueAttribute($value)
public function setValueAttribute($value): void
{
// Check that the value can be set
if (! $this->key)
@@ -111,7 +105,7 @@ class SiteDetail extends Model
* @return mixed
* @throws \Exception
*/
public static function sample($key)
public static function sample($key): mixed
{
return Arr::get(self::sampleData,$key);
}