| Total Complexity | 8 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 9 | class Crawlers extends Model |
||
| 10 | { |
||
| 11 | protected $table = 'crawlers'; |
||
| 12 | |||
| 13 | protected $fillable = [ |
||
| 14 | 'name', |
||
| 15 | 'description' |
||
| 16 | ]; |
||
| 17 | |||
| 18 | |||
| 19 | |||
| 20 | public function runs() |
||
| 23 | } |
||
| 24 | public function last_run() |
||
| 28 | } |
||
| 29 | |||
| 30 | |||
| 31 | public function getLastRunnedAtAttribute() |
||
| 32 | { |
||
| 33 | if ($this->last_run) { |
||
| 34 | return $this->last_run->created_at; |
||
| 35 | } |
||
| 36 | |||
| 37 | return null; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function activate() |
||
| 49 | } |
||
| 50 | public function deactivate() |
||
| 59 | } |
||
| 60 | } |
||
| 61 |