Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class Item extends Models
- {
- protected $fillable = [
- 'name',
- 'type',
- 'expirationDate',
- 'amount'
- ];
- protected $casts = [
- 'name' => 'string',
- 'type' => 'string',
- 'expirationDate' => 'date',
- 'amount' => 'float'
- ];
- public function Items() {
- return $this->hasMany('App\Models\Item');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement