lundi 26 février 2018

Import Mysql functions file on laravel seeder

I have some functions for Mysql on test.sql file.
When I import this file on mysql from phpmyadmin everything is ok.
But I want import it dynamically from Laravel Seeder. When I use this on my seeder, does not import it on my Mysql.

public function run()
 {
    DB::unprepared(file_get_contents(base_path().'/myfolder/test.sql'));
 }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire