dimanche 27 novembre 2016

Laravel - Can't put the id of authenticated user in array

I want to put the id of authenticated user in the associative array.

Code

const USER_RULES = [
    'email' => "required|unique:users,email," . Auth::user()->id . "|email",
];

Above code generates the following error:

Constant expression contains invalid operations



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2gjz5fV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire