Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Daniel-Pablo's avatar

Hard time solving the SUSHI Error - could not find driver (SQL: select *

could not find driver (SQL: select * from "app_countrys")

when 

use App\AppCountrys;

        return view( 'account.editProfile' )
        ->with([
            'countrys' => AppCountrys::all(),
        ]);

laravel is trying to get the app_country table from the SQL but I am using SUSHI Pack the one Porcio made

this is the class

namespace App;

use Illuminate\Database\Eloquent\Model;

class AppCountrys extends Model
{
    use \Sushi\Sushi;

    protected $rows = [

        [ 'abbr' => 'AF' , 'name' => 'Afghanistan' ],
]

}

all the laravel is working all exept this call to this specific class that is calling a special DB

0 likes
7 replies
Snapey's avatar

try using get() instead of all()

Daniel-Pablo's avatar

@snapey thanks snapey, I change it but still not work, I am deploying on a new server I don't know if this must be something related to php.ini configuration I mean this is what caleb porzio wrote on the Shushi paper

https://github.com/calebporzio/sushi

How It Works Under the hood, this package creates and caches an SQLite database JUST for this model. It creates a table and populates the rows. If for whatever reason, it can't cache a .sqlite file, it will default to using an in-memory sqlite database.

... maybe but I just uncomment the things in the php.ini nothing happen

Daniel-Pablo's avatar

@snapey got an advance I install

sudo apt install php7.4-sqlite3

and now got this error

SQLSTATE[HY000]: General error: 1 no such table: app_countrys (SQL: select * from "app_countrys")
eleazarbr's avatar

Just delete the .sqlite file from /storage/framework/cache and try again!

2 likes
awsqed's avatar

Try using AppCountrys::getRows() instead.

yokozawa0701's avatar

Are you using sqlite? Sushi looks like to work only with sqlite driver.

Snapey's avatar
Snapey
Best Answer
Level 122

@yokozawa0701 they are not waiting two years for your reply.

Anyone reading this, just try reading the package docs. Yes of course it uses sqlite (only). So what?

Please or to participate in this conversation.