'object', 'updated_at' => 'timestamp', 'created_at' => 'timestamp', 'deleted_at' => 'timestamp', ]; protected $fillable = [ 'name', 'settings' ]; public function company() { return $this->belongsTo(Company::class); } public function user() { return $this->belongsTo(User::class); } public function clients() { return $this->hasMany(Client::class, 'id', 'group_settings_id'); } /** * Retrieve the model for a bound value. * * @param mixed $value * @return \Illuminate\Database\Eloquent\Model|null */ public function resolveRouteBinding($value) { return $this ->where('id', $this->decodePrimaryKey($value))->firstOrFail(); } }