| 1 | <?php namespace JobApis\JobsToMail\Models; |
||
| 7 | class Recruiter extends Model |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Indicates that the IDs are not auto-incrementing. |
||
| 11 | * |
||
| 12 | * @var bool |
||
| 13 | */ |
||
| 14 | public $incrementing = false; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The attributes that are mass assignable. |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $fillable = [ |
||
| 22 | 'name', |
||
| 23 | 'url', |
||
| 24 | ]; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Boot function from laravel. |
||
| 28 | */ |
||
| 29 | 2 | protected static function boot() |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Very simple filter to get recruiting firms by name |
||
| 40 | * |
||
| 41 | * @param $query |
||
| 42 | * @param string $name |
||
| 43 | * |
||
| 44 | * @return \Illuminate\Database\Eloquent\Builder |
||
| 45 | */ |
||
| 46 | 1 | public function scopeWhereNameLike($query, $name = null) |
|
| 51 | } |
||
| 52 |