File manager - Edit - /home/linknsbh/cecil-hotel.net/platform/plugins/hotel/src/Models/Food.php
Back
<?php namespace Botble\Hotel\Models; use Botble\Base\Casts\SafeContent; use Botble\Base\Enums\BaseStatusEnum; use Botble\Base\Models\BaseModel; use Illuminate\Database\Eloquent\Relations\BelongsTo; class Food extends BaseModel { protected $table = 'ht_foods'; protected $fillable = [ 'name', 'description', 'price', 'currency_id', 'food_type_id', 'image', 'status', ]; protected $casts = [ 'status' => BaseStatusEnum::class, 'name' => SafeContent::class, 'description' => SafeContent::class, ]; public function type(): BelongsTo { return $this->belongsTo(FoodType::class, 'food_type_id')->withDefault(); } public function currency(): BelongsTo { return $this->belongsTo(Currency::class, 'currency_id')->withDefault(); } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.52 |
proxy
|
phpinfo
|
Settings