pint run
This commit is contained in:
1 parent
00bcaa2b93
commit
1559580ceb
37 files changed
+211
-162
No files matched your search
@@ -2,22 +2,20 @@
|
||||
|
||||
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"];
|
||||
protected $fillable = ['name', 'duration'];
|
||||
|
||||
public function kids(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Kid::class)->withPivot("date");
|
||||
return $this->belongsToMany(Kid::class)->withPivot('date');
|
||||
}
|
||||
|
||||
public function belts(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Belt::class);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user