Laravel 5.2 artisan error: Parse error: syntax error, unexpected ':' - laravel

Error
i am using Laravel 5.2 and PHP 7.3.12. and everything was working fine but today whenever i write any artisan command in laravel it gives this error:
[Symfony\Component\Debug\Exception\FatalThrowableError] Parse error: syntax error, unexpected ':'
i don't understand why its giving this error because last night it was working fine.

There must be No extra space " " between : and list
php artisan route:list

Related

Parse error: syntax error, unexpected '$kernel' (T_VARIABLE) in the index.php file

When I upload my Laravel project to cPanel I get the following error
Parse error: syntax error, unexpected '$kernel' (T_VARIABLE)
Your php version is too low. Try version 7.0 or later php.

I got this error PHP Parse error Laravel 5.5

When I write any command like php artisan or composer update i got this '?' in .../vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233
This line use the ?? operator which is a php 7.0 feature.
Make sure to use PHP 7.0 or above

anyone got an error i get while installing teepluss/theme in laravel

I wanted to install teepluss/theme so I added it to my composer.json
but now I get this error:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'SuperClosure\Serializer' not found
I was capable to solve the first error by adding >"jeremeamia/superclosure": "^2.0"
but now when I add >Teepluss\Theme\ThemeServiceProvider::class, in app.php providers I get a new error :
> [ErrorException] Illegal offset type in unset
here's what i got in the script in composer.json
If you already run composer update, you can try run this script
php artisan config:cache
and
php artisan cache:clear.It can help you resolve that problem

Laravel composer autoload/ guzzlehttp : fatal error

When deploying my Laravel website (1&1 mutualized), this is the fatal error I get:
Fatal error: require(): Failed opening required '/homepages/41/d623699018/htdocs/athyr/athyr - copie/athyrcopie/vendor/composer/../guzzlehttp/psr7/src/functions_include.php' (include_path='.:/usr/lib/php7.0') in /homepages/41/d623699018/htdocs/athyr/athyr - copie/athyrcopie/vendor/composer/autoload_real.php on line 66
I already tried composer update & composer dump_autoload. And I checked that it's PHP 7 everywhere.
Have you tried:
php artisan optimize

Laravel 5 command php artisan... Parse error: syntax error, unexpected ':'

I was working on composer and perfect. with artisan methods I created many things.
then he was working on routes and wanted to create a Controller.
php artisan make: controller UsersController
and displays the following error
[Symfony \ Component \ Debug \ Exception \ FatalThrowableError]
Parse error: syntax error, unexpected ':'
I wanted to try commands before if they worked and did not work
you uninstall and install composer and error everywhere, not to update, install etc.
always appears the error ':'':'':'':'
[Symfony \ Component \ Debug \ Exception \ FatalThrowableError]
Parse error: syntax error, unexpected ':'
thank you for your help
I think its due to the space between 'make:' and 'controller'. I generally use 'php artisan make:controller UserController'.

Resources