Laravel 8 - Could not find driver : Illuminate\Database\QueryException could not find driver (SQL: select * from `list`)

I have installed Laravel 8 on my Linux Mint 20 for my personal experiment so I'm new on Laravel's new version. I've searching many source how to show tables with CRUD method so the table is shown in the web with contains data from MySQL database

But when i tried to show table with CRUD method, it appeared like this :

Illuminate\Database\QueryException could not find driver (SQL: select * from list)

in localhost:8000/home/tabel

I tried to solving this problem from repairing .env file, Controller file, blade file, and the web.php to be correct but it still error.

And this is my configuration file which i've change like this :





namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class homeController extends Controller
    public function home()
        return "home";

    public function tabel()
        $tabelku = DB::table('list')->get();
        return view('tabel', ['people' => $tabelku]);



<!DOCTYPE html>


        <div align="center">
            <table border = "1">

                @foreach($tabelku as $t)

and then web.php


use Illuminate\Support\Facades\Route;

| Web Routes
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!

Route::get('/', function () {
    return view('welcome');

Route::get('/hello', function () {
    return 'Halo Dunia';



And this is database and table which i use to show tables from CRUD method -> enter image description here

For MySQL database i use XAMPP

Can anyone explain why this is error and give me solution what should I do to repair this?


  • Just install appropriate driver for PHP-MySQL:

    # default
    sudo apt install php-mysql
    # for specific version of php (e.g. php7.4)
    sudo apt install php7.4-mysql

    Restart your server:

    # apache
    sudo systemctl restart apache2
    # nginx
    sudo systemctl restart nginx