lundi 21 septembre 2015

Extending Blueprint for SQLite in Laravel 5

I have a custom Blueprint class, In order to use it I followed the steps in this gist.

Basically, it says I need to extend a MySqlConnection and use a MySqlBuilder that Laravel conviniently has in the Schema folder.

It worked great for MySQL! The problem is I'm using SQLite for testing, and I need the Bluepint there too, the issue is there is no base SqliteConnection nor SqliteBuilder...

Of course, I get the following Exception:

Argument 1 passed to CreateUsersTable::{closure}() 
must be an instance of MyBlueprint
instance of Illuminate\Database\Schema\Blueprint given

Do I have to write those missing classes myself? Hope not


By the way, this question has been asked here for Laravel 4 but I don't want to bind my Blueprint by hand on every migration...



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire