Add groups page. Update landing Add toastmagic
This commit is contained in:
@@ -4,6 +4,8 @@ namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
@@ -45,4 +47,18 @@ class User extends Authenticatable
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
|
||||
public function crews(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
Crew::class,
|
||||
'crew_members',
|
||||
'user_id',
|
||||
'crew_id'
|
||||
)->withTimestamps();
|
||||
}
|
||||
public function settings(): HasMany
|
||||
{
|
||||
return $this->hasMany(Setting::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user