for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Judite\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
Illuminate\Notifications\Notifiable
App\Judite\Models\User
$email
$phone_number
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
* The attributes that should be hidden for arrays.
protected $hidden = [
'password', 'remember_token',
* Get student of this user.
* @return \Illuminate\Database\Eloquent\Relations\HasOne
public function student()
return $this->hasOne(Student::class);
}
* Check if the user is an Admin.
* @return bool
public function isAdmin(): bool
return $this->is_admin;
* Check if the user is a Student.
public function isStudent(): bool
return ! is_null($this->student);