Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| CategoryDescription | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| getUrlAttribute | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace App; | |
| use Illuminate\Database\Eloquent\Model; | |
| class CategoryDescription extends Model | |
| { | |
| // No Timestamp | |
| public $timestamps = false; | |
| /** | |
| * The attributes that are mass assignable. | |
| * | |
| * @var array | |
| */ | |
| protected $fillable = [ | |
| 'name', 'slug', 'category_id', 'language_id', 'keywords', 'meta_description' | |
| ]; | |
| /** | |
| * Get the url | |
| */ | |
| public function getUrlAttribute(): string | |
| { | |
| return action('Admin\CategoryController@details', [$this->id, $this->name]); | |
| } | |
| } |