added basic user registration api

This commit is contained in:
2023-08-01 00:03:48 +02:00
parent f3845c2f33
commit d423c41ec7
7 changed files with 94 additions and 34 deletions

View File

@ -2,44 +2,30 @@
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Faker\Core\Uuid;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Date;
class User extends Authenticatable
class User extends Model
{
use HasApiTokens, HasFactory, Notifiable;
use HasFactory;
use HasUuids;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
* @var mixed|\Ramsey\Uuid\UuidInterface
*/
protected $table = 'user';
protected $fillable = [
'name',
'email',
'firstname',
'lastname',
'birthday',
'telephone',
'username',
'playertype',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}