Page MenuHomeDevCentral

User.php
No OneTemporary

User.php

<?php namespace AuthGrove;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class User extends Model implements AuthenticatableContract, CanResetPasswordContract {
use Authenticatable, CanResetPassword;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['username', 'fullname', 'email', 'password'];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = ['password', 'remember_token'];
/**
* Gets the full name of an user, or if not defined, the username.
*/
public function getName () {
if ($this->attributes['fullname'] !== "") {
return $this->attributes['fullname'];
}
return $this->attributes['username'];
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Apr 16, 05:11 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3624566
Default Alt Text
User.php (1 KB)

Event Timeline