Search code examples
laravel-5.1laravel-artisanartisan-migrate

Parse Error in php artisan migrate


php artisan migrate gives throws the following error.

[Symfony\Component\Debug\Exception\FatalErrorException] parse error, expecting "identifier (T_STRING)"

How should I debug this? What are the possible reasons for this error?

PHP version = 5.5.24


Solution

  • Laravel requires a PHP version greater than or equal to 5.5.9 which is why you're getting this error.

    If you update PHP it will solve the problem. Or for local development just use Laravel Homestead as it comes with all the necessary requirements.

    For more info check out the documentation.