cacheFor = config('api.arcadiaBrandsDBCache') * 60; parent::__construct($attributes); } /** * Set the base cache tags that will be present * on all queries. * * ! This is used to flush caching * * @return array */ protected function getCacheBaseTags(): array { return [ 'incollector_arcadia_brands', ]; } /** * Perform any actions required after the model boots. * * @return void */ protected static function booted() { static::created(function () { // * Flush Eloquent cache. self::flushQueryCache(); }); static::updated(function () { // * Flush Eloquent cache. self::flushQueryCache(); }); static::deleted(function () { // * Flush Eloquent cache. self::flushQueryCache(); }); } // * RELATIONS /** * Service belongsToMany relation * * @return \Illuminate\Database\Eloquent\Relations\belongsToMany */ public function services() { return $this->belongsToMany(Service::class); } }