Pages

Thursday 10 August 2017

Laravel Basic Error

[:error] PHP Parse error:  syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 444



Run this command


sudo a2dismod php5 && sudo a2enmod php5.6 && sudo service apache2 restart

----------------------------------------------------------------------------------------------------------------------------------

[:error]SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

[:error]
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users`  add unique users_email_unique`(`email`))


Change in config/database.php


'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',