Feat: Organize videos by sector
This commit is contained in:
@@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Tymon\JWTAuth\Contracts\JWTSubject;
|
||||
use App\Models\Sector;
|
||||
|
||||
class User extends Authenticatable implements JWTSubject
|
||||
{
|
||||
@@ -16,6 +17,7 @@ class User extends Authenticatable implements JWTSubject
|
||||
'email',
|
||||
'password',
|
||||
'role_id',
|
||||
'sector_id',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
@@ -47,4 +49,9 @@ class User extends Authenticatable implements JWTSubject
|
||||
{
|
||||
return $this->belongsToMany(Workshop::class, 'user_workshop')->withTimestamps();
|
||||
}
|
||||
|
||||
public function sector()
|
||||
{
|
||||
return $this->belongsTo(Sector::class, 'sector_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user