Laravel-Backpack /
CRUD
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Backpack\CRUD\Tests\Config\Models; |
||
| 4 | |||
| 5 | use Backpack\CRUD\app\Models\Traits\CrudTrait; |
||
| 6 | |||
| 7 | class TestModel extends \Illuminate\Database\Eloquent\Model |
||
| 8 | { |
||
| 9 | use CrudTrait; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 10 | |||
| 11 | protected $casts = [ |
||
| 12 | 'arrayCast' => 'array', |
||
| 13 | 'jsonCast' => 'json', |
||
| 14 | 'dateCast' => 'date', |
||
| 15 | 'booleanCast' => 'boolean', |
||
| 16 | 'datetimeCast' => 'datetime', |
||
| 17 | 'numberCast' => 'timestamp', |
||
| 18 | ]; |
||
| 19 | |||
| 20 | protected $dates = [ |
||
| 21 | 'someDate', |
||
| 22 | ]; |
||
| 23 | |||
| 24 | public function buttonModelFunction() |
||
| 25 | { |
||
| 26 | return 'model function button test'; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function article() |
||
| 30 | { |
||
| 31 | return $this->belongsTo('Backpack\CRUD\Tests\Config\Models\Article'); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |