Laravel 5 : Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)

TrueCode Source

On my Local server everything was good was using mailtrap mail server as smtp server. but when my website is on live server and when I trying to reset password (forgot password ) getting following error screenshot is attached.I am using hostgators cpanels inbuilt smtp. any more details I will provide if needed.enter image description here



answered 6 months ago Alexey Mezenin #1

You need to install PHP version 7.1 because nullable types were introduced in 7.1:

?string $value

And from the Laravel docs:

You will need to make sure your server meets the following requirements:

PHP >= 7.1.3

comments powered by Disqus