änderungen zuammengeführt
This commit is contained in:
1 parent
ec5b6ba86f
commit
e952c060f3
33 files changed
+1097
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Kid;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class Course extends Model
|
||||
{
|
||||
protected $fillable = ["name", "duration"];
|
||||
|
||||
public function kids(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Kid::class)->withPivot("date");
|
||||
}
|
||||
|
||||
public function belts(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Belt::class);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user