27 lines
444 B
PHP
27 lines
444 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Paddock extends Model
|
|
{
|
|
// Paddocks should be closed by default
|
|
protected $attributes = array(
|
|
'isClosed' => TRUE,
|
|
);
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'isClosed',
|
|
];
|
|
|
|
|
|
/**
|
|
* Get the state changes for a paddock
|
|
*/
|
|
public function state_changes() {
|
|
return $this->hasMany('App\PaddockStateChange');
|
|
}
|
|
}
|