for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Containers\User\Models;
use App\Containers\Authentication\Traits\TokenTrait;
use App\Containers\Stripe\Models\StripeAccount;
use App\Port\Model\Abstracts\Model;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Spatie\Permission\Traits\HasRoles;
/**
* Class User.
*
* @author Mahmoud Zalt <[email protected]>
*/
class User extends Model implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract
{
use Authenticatable, Authorizable, CanResetPassword, SoftDeletes, TokenTrait, HasRoles;
* The database table used by the model.
* @var string
protected $table = 'users';
* The attributes that are mass assignable.
* @var array
protected $fillable = [
'name',
'email',
'password',
'device',
'platform',
'confirmed',
'gender',
'birth',
'social_provider',
'social_token',
'social_refresh_token',
'social_expires_in',
'social_token_secret',
'social_id',
'social_avatar',
'social_avatar_original',
'social_nickname',
];
* The dates attributes.
protected $dates = [
'created_at',
'updated_at',
'deleted_at',
* The attributes excluded from the model's JSON form.
protected $hidden = [
'remember_token',
'token',
public function stripeAccount()
return $this->hasOne(StripeAccount::class);
}