php artisan migrate throwing [PDO Exception] Could not find driver - Using Laravel

后端 未结 26 1598
眼角桃花
眼角桃花 2020-12-01 07:41

I have a bad experience while installing laravel. However, I was able to do so and move to the next level. I used generators and created my migrations. But when I type the

26条回答
  •  时光说笑
    2020-12-01 07:54

    first check your php version like this :

    php -v
    

    after you get version number for example i get 7.1 then install like that

    sudo apt-get install  php7.1-sqlite     //for laravel testing with sqlite
    sudo apt-get install  php-mysql         //for default mysql
    sudo apt-get install  php7.1-mysql      //for version based mysql 
    sudo apt-get install  php7.1-common     //for other necessary package for php
    

    and need to restart apache2

    sudo service apache2 restart
    

提交回复
热议问题