Answer the question
In order to leave comments, you need to log in
Why is it throwing an error on artisan command?
Hello everyone, I'm new to this and I'm having a problem!!
I'm trying to make a migration and when I type php artisan migrate:install I get the
following error
PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/artisan on line 31
Answer the question
In order to leave comments, you need to log in
Does the PHP version exactly match the requirements of the framework? This is both a question and an answer in one bottle. And we also don't know how to google:
Laravel 5.1 uses the ::class property to get string representations of a fully qualified classname. The error you're seeing is caused by this line
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
This language feature has been introduced in PHP 5.5 which is a requirement of Laravel 5.1. Your installed PHP version is probably older than 5.5. Try to update your PHP binary.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question