fix select defaut value

This commit is contained in:
2020-09-12 08:52:20 +02:00
parent e91671a78f
commit 68cbc950f5
9 changed files with 41 additions and 33 deletions

View File

@@ -37,7 +37,7 @@ class Event extends JsonResource
],
],
'links' => [
'self' => url('/events/'.$this->id),
'self' => $this->path(),
]
];
}

View File

@@ -11,6 +11,11 @@ class Event extends Model
{
protected $guarded = [];
public function path()
{
return '/events/' . $this->id;
}
public function category() :BelongsTo
{
return $this->belongsTo(EventCategory::class, 'category_id');