Shorthand if else in PHP with multiple lines -


I can not know if there are exact control structures for PHP then / else.

I have this function at the moment but someone can tell me whether PHP is looking for "tabs" only? And is it possible to trigger many functions within only 1 statement? As it redirects only on one path but says that I want to email a user when it updates before the redirect. Is it still possible with short stories?

  Public function store () {return ($ user = $ this-> user- & gt; store (input- & gt; all ())? Redirect: Root ('user.index') - & gt; ('Flash_message', 'User successfully created!', ['User' = & gt; $ user]): Redirect :: route ('user.create') - & gt; With input () - & gt; Along with the partners ($ - this-> User-> GetErrors ()); }  

This is the document for PHP if / else:

? : If there is a short story for structure / other, but it is not a good practice to use it for complex things. This makes your code unreadable.

Otherwise PHP does not care about white spots.


Comments