I am new whit Laravel and write my first route
, but have my first problem.
Server : Php5.6 + Mysql + apache2 , Linux Mint
First install whit :
composer create-project laravel/laravel test 5.0 --prefer-dist
And permisions in :
chmod 777 -R ./storage/ && chmod 777 -R ./bootstrap/
In route php
Route::get('/test',function (){
echo "Batman like the black color.";
});
This can go to direction localhost/<nameproyect>/test
. This not go , but i write for check this route is create fine , write php artisan route:list
.
This is a broblem:
[PDOException]
could not find driver
In php.ini , i have :
extension = pdo.so
extension = pdo_mysql.so
Solution :
sudo apt-get install php-mysql
And other problem :
[2016-11-10 16:15:24] local.ERROR: PDOException: SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)
Solution whit .env
:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=forge
DB_USERNAME=root
DB_PASSWORD=1234