updating env example file

This commit is contained in:
2022-03-30 13:23:25 -06:00
parent f96e7eb0aa
commit 74055ea11b
20 changed files with 850 additions and 77 deletions

View File

@ -3,6 +3,7 @@
namespace App\Models;
use App\Models\Traits\HasUidTrait;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Prunable;
use Illuminate\Database\Eloquent\Relations\MorphOne;
@ -11,6 +12,7 @@ use Illuminate\Notifications\Notifiable;
use Laravel\Fortify\TwoFactorAuthenticatable;
use Laravel\Jetstream\HasProfilePhoto;
use Laravel\Jetstream\HasTeams;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
@ -119,28 +121,32 @@ class User extends Authenticatable
|
*/
/**
* Return the surname then (first)name separated by a comma.
*
* @since 1.0.0
*
* @return string
*/
public function getFullNameAttribute(): string
{
return "{$this->surname}, {$this->name}";
}
/**
* Return both the (first)name and surname.
*
* @since 1.0.0
*
* @return string
* @return \Illuminate\Database\Eloquent\Casts\Attribute
*/
public function getNameFullAttribute(): string
public function fullName(): Attribute
{
return "{$this->name} {$this->surname}";
return Attribute::make(
get: fn ($value, $attributes) => "{$attributes['name']} {$attributes['surname']}",
);
}
/**
* Return the surname then (first)name separated by a comma.
*
* @since 1.0.0
*
* @return \Illuminate\Database\Eloquent\Casts\Attribute
*/
public function fullNameReversed(): Attribute
{
return Attribute::make(
get: fn ($value, $attributes) => "{$attributes['surname']}, {$attributes['name']}",
);
}
/*