add shipping rules
This commit is contained in:
22
app/User.php
22
app/User.php
@@ -3,15 +3,14 @@
|
||||
namespace App;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Yadahan\AuthenticationLog\AuthenticationLogable;
|
||||
use Laratrust\Traits\LaratrustUserTrait;
|
||||
use Mpociot\Teamwork\Traits\UserHasTeams;
|
||||
use Sebastienheyd\Boilerplate\Notifications\NewUser as NewUserNotification;
|
||||
use Sebastienheyd\Boilerplate\Notifications\ResetPassword as ResetPasswordNotification;
|
||||
use Yadahan\AuthenticationLog\AuthenticationLogable;
|
||||
|
||||
/**
|
||||
* Sebastienheyd\Boilerplate\Models\User.
|
||||
@@ -46,10 +45,9 @@ use Sebastienheyd\Boilerplate\Notifications\ResetPassword as ResetPasswordNotifi
|
||||
* @method static \Illuminate\Database\Query\Builder|\Sebastienheyd\Boilerplate\Models\User whereRememberToken($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Sebastienheyd\Boilerplate\Models\User whereRoleIs($role = '')
|
||||
* @method static \Illuminate\Database\Query\Builder|\Sebastienheyd\Boilerplate\Models\User whereUpdatedAt($value)
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable;
|
||||
@@ -67,7 +65,6 @@ class User extends Authenticatable
|
||||
|
||||
protected $hidden = ['password', 'remember_token'];
|
||||
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*
|
||||
@@ -104,8 +101,7 @@ class User extends Authenticatable
|
||||
/**
|
||||
* Send the password reset notification.
|
||||
*
|
||||
* @param string $token
|
||||
*
|
||||
* @param string $token
|
||||
* @return void
|
||||
*/
|
||||
public function sendPasswordResetNotification($token)
|
||||
@@ -116,7 +112,7 @@ class User extends Authenticatable
|
||||
/**
|
||||
* Send notification when a new user is created.
|
||||
*
|
||||
* @param string $token
|
||||
* @param string $token
|
||||
*/
|
||||
public function sendNewUserNotification($token)
|
||||
{
|
||||
@@ -126,7 +122,6 @@ class User extends Authenticatable
|
||||
/**
|
||||
* Return last name in uppercase by default.
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -138,7 +133,6 @@ class User extends Authenticatable
|
||||
/**
|
||||
* Return first name with first char of every word in uppercase.
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -150,13 +144,12 @@ class User extends Authenticatable
|
||||
/**
|
||||
* Return a concatenation of first name and last_name if field name does not exists.
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNameAttribute($value)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
if (! empty($value)) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
@@ -166,9 +159,8 @@ class User extends Authenticatable
|
||||
/**
|
||||
* Return last login date formatted.
|
||||
*
|
||||
* @param string $format
|
||||
* @param string $default
|
||||
*
|
||||
* @param string $format
|
||||
* @param string $default
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function getLastLogin($format = 'YYYY-MM-DD HH:mm:ss', $default = '')
|
||||
|
||||
Reference in New Issue
Block a user