27 lines
499 B
PHP
27 lines
499 B
PHP
<?php
|
|
|
|
namespace App\ModelFilters;
|
|
|
|
use EloquentFilter\ModelFilter;
|
|
|
|
class FriendLinkFilter extends ModelFilter
|
|
{
|
|
public function name($name)
|
|
{
|
|
return $this->where('name', 'like', $name.'%');
|
|
}
|
|
|
|
public function type($type)
|
|
{
|
|
return $this->where('type', $type);
|
|
}
|
|
|
|
public function recommend($recommend){
|
|
return $this->where('is_recommend', $recommend);
|
|
}
|
|
|
|
public function show($show){
|
|
return $this->where('is_show', $show);
|
|
}
|
|
}
|