Estado inicial: frontend React + backend Laravel

This commit is contained in:
Xavier Oliveira
2026-05-15 15:57:54 +01:00
commit 41c5f87d5b
216 changed files with 29916 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Tymon\JWTAuth\Contracts\JWTSubject;
class User extends Authenticatable implements JWTSubject
{
use HasFactory, Notifiable;
protected $fillable = [
'name',
'email',
'password',
'role_id',
'created_at',
];
protected $hidden = [
'password',
'remember_token',
];
protected $casts = [
'email_verified_at' => 'datetime',
];
public function getJWTIdentifier()
{
return $this->getKey();
}
public function getJWTCustomClaims()
{
return [];
}
public function role()
{
return $this->belongsTo(Role::class);
}
public function workshops()
{
return $this->belongsToMany(Workshop::class, 'user_workshop')->withTimestamps();
}
}