Caching & search configuration in repository classes

This commit is contained in:
Nabeel Shahzad
2017-12-01 10:53:33 -06:00
parent 8509daab35
commit 9706114289
12 changed files with 56 additions and 104 deletions

View File

@@ -3,19 +3,18 @@
namespace App\Repositories;
use App\Models\Subfleet;
use Prettus\Repository\Contracts\CacheableInterface;
use Prettus\Repository\Traits\CacheableRepository;
class SubfleetRepository extends BaseRepository
class SubfleetRepository extends BaseRepository implements CacheableInterface
{
/**
* @var array
*/
protected $fieldSearchable = [
use CacheableRepository;
protected $fieldSearchable = [
'name' => 'like',
'type' => 'like',
];
/**
* Configure the Model
**/
public function model()
{
return Subfleet::class;