in controller.php (parent class)
function __construct() {
DB::disconnect('DataBase');
}
child class of parent class
i disconnect the database globally and reconnect the needed functions in child class
public function getDomain()
{
DB::reconnect('DataBase');
$select = "select * from product";
$execute = DB::select($select);
print_r($execute);
return view('test');
}
from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2GCIU9W
via IFTTT
Aucun commentaire:
Enregistrer un commentaire