Put back site_id middleware
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user