fix select defaut value
This commit is contained in:
@@ -37,7 +37,7 @@ class Event extends JsonResource
|
||||
],
|
||||
],
|
||||
'links' => [
|
||||
'self' => url('/events/'.$this->id),
|
||||
'self' => $this->path(),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user