12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- declare(strict_types=1);
- namespace App\Model;
- use Hyperf\DbConnection\Model\Model;
- use App\Model\WebsiteCategory;
- use App\Model\FooterCategory;
- /**
- */
- class Website extends Model
- {
- /**
- * The table associated with the model.
- */
- protected ?string $table = 'website';
- /**
- * The attributes that are mass assignable.
- */
- protected array $fillable = [];
- /**
- * The attributes that should be cast to native types.
- */
- protected array $casts = [];
- public function websiteCategory()
- {
- return $this->hasMany(WebsiteCategory::class,'website_id','id');
- }
- public function footerCategory()
- {
- return $this->hasMany(FooterCategory::class,'web_id','id');
- }
- }
|