Feat: Organize videos by sector

This commit is contained in:
Xavier Oliveira
2026-06-16 12:25:58 +01:00
parent c5ed77945e
commit 84e9bf7307
21 changed files with 477 additions and 116 deletions

View File

@@ -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');
}
}