| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\HasMany;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class Category extends Model
- {
- use SoftDeletes;
- protected $guarded = ['id'];
- protected function casts(): array
- {
- return [
- 'active' => 'boolean',
- ];
- }
- public function partnerAgreements(): HasMany
- {
- return $this->hasMany(PartnerAgreement::class);
- }
- public function partnerAgreementServices(): HasMany
- {
- return $this->hasMany(PartnerAgreementService::class);
- }
- public function storeItems(): HasMany
- {
- return $this->hasMany(StoreItem::class);
- }
- }
|