vendredi 6 juillet 2018

Laravel 5.6 - creation user not working

my application used to working well with registration user but now it dont.

here a portion of my model User

 protected $fillable = [
    'prenom', 'nom', 'email','photo_path','password',
];

here my create function :

 protected function create(array $data)
{
    dd($data);
    $photoInput = request('photo_path');
    $userPhotoPath='users';
    $storagePhotoPath = Storage::disk('images')->put($userPhotoPath, $photoInput);

    return User::create([
        'prenom' => $data['prenom'],
        'nom' => $data['nom'],
        'email' => $data['email'],
        'photo_path' => $storagePhotoPath,
        'password' => Hash::make($data['password']),
    ]);

}

- POST request working ( return 302 ) but return back with input value - Auth Route are declared in web.php - Validation working well

but the php interpretor didnt get inside create function...

i have no idea why it dont working now... do you have any clue ?

Thank you all



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire