Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 2 |
| WebsiteCategory | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 2 |
| descriptions | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| photos | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace App; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Database\Eloquent\Relations\HasMany; | |
| use Illuminate\Database\Eloquent\SoftDeletes; | |
| /** | |
| * @property mixed id | |
| */ | |
| class WebsiteCategory extends Model | |
| { | |
| // use soft delete | |
| use SoftDeletes; | |
| /** | |
| * @return HasMany | |
| */ | |
| public function descriptions() :HasMany | |
| { | |
| return $this->hasMany(WebsiteCategoryDescription::class); | |
| } | |
| /** | |
| * Return photos for website gallery | |
| * @return HasMany | |
| */ | |
| public function photos() :HasMany | |
| { | |
| return $this->hasMany(WebsitePhoto::class); | |
| } | |
| } |