moved folders to common directory
This commit is contained in:
21
app/Filters/Common/Companies.php
Normal file
21
app/Filters/Common/Companies.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filters\Common;
|
||||
|
||||
use EloquentFilter\ModelFilter;
|
||||
|
||||
class Companies extends ModelFilter
|
||||
{
|
||||
/**
|
||||
* Related Models that have ModelFilters as well as the method on the ModelFilter
|
||||
* As [relatedModel => [input_key1, input_key2]].
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $relations = [];
|
||||
|
||||
public function search($query)
|
||||
{
|
||||
return $this->whereLike('domain', $query);
|
||||
}
|
||||
}
|
||||
26
app/Filters/Common/Items.php
Normal file
26
app/Filters/Common/Items.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filters\Common;
|
||||
|
||||
use EloquentFilter\ModelFilter;
|
||||
|
||||
class Items extends ModelFilter
|
||||
{
|
||||
/**
|
||||
* Related Models that have ModelFilters as well as the method on the ModelFilter
|
||||
* As [relatedModel => [input_key1, input_key2]].
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $relations = [];
|
||||
|
||||
public function search($query)
|
||||
{
|
||||
return $this->whereLike('name', $query);
|
||||
}
|
||||
|
||||
public function category($id)
|
||||
{
|
||||
return $this->where('category_id', $id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user