dimanche 17 juin 2018

Finiding the error in my function Parse error: syntax error, unexpected '}'

Hi everyone i can't find the error in my function store():

This is the following code:

public function store(Request $request)  {

   $post= new Post();
   $post->title = $request->input('title');

    if (Auth::check()) {

    $postPhoto = Auth::user()->photo;
    $emailpost = Auth::user()->email;

} else {

    $postPhoto = public_path('/images/def.jpg');
    $emailpost = $request->input('username');
}

     $post->photo = $postPhoto;
     $post->username = $emailpost;

      $post->body = $request->input('body');
   $post->save();

   return redirect ('/ed');
}

Can anyone help me to find it?



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

Aucun commentaire:

Enregistrer un commentaire