Answers for "laravel dynamic attributes"

PHP
0

laravel dynamic attributes

class User extends Eloquent {


    public function getFullNameAttribute()
    {
        return $this->first_name.' '.$this->last_name;
    }
}
Posted by: Guest on August-06-2020
0

laravel dynamic attributes

$user = User::find(1);
$user->full_name;
Posted by: Guest on August-06-2020

Browse Popular Code Answers by Language