خرید بک لینک

Vote count: 0

I need to retu an object of class User in laravel 5.2 but all I get is 'Undefined variable: user' and I am sure that I am logged and there is an instance of the User. The code is:

$name = 'Random';
$this->createCustomer($name);

dd($user);

public function createCustomer($name) {
    $user = Auth::user();
    $user ->name = $name
    retu $user;
}

All I get at the end is 'Undefined variable: user'

Thanks for your help

asked 44 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 29 تير 1395 ساعت: 3:18

صفحه بندی