first commit
This commit is contained in:
26
app/Filters/Settings/Categories.php
Normal file
26
app/Filters/Settings/Categories.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filters\Settings;
|
||||
|
||||
use EloquentFilter\ModelFilter;
|
||||
|
||||
class Categories 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 type($type)
|
||||
{
|
||||
return $this->where('type', $type);
|
||||
}
|
||||
}
|
||||
21
app/Filters/Settings/Currencies.php
Normal file
21
app/Filters/Settings/Currencies.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filters\Settings;
|
||||
|
||||
use EloquentFilter\ModelFilter;
|
||||
|
||||
class Currencies 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);
|
||||
}
|
||||
}
|
||||
21
app/Filters/Settings/Taxes.php
Normal file
21
app/Filters/Settings/Taxes.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filters\Settings;
|
||||
|
||||
use EloquentFilter\ModelFilter;
|
||||
|
||||
class Taxes 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user