I am trying to use the Facade DB in order to execute a stored procedure in my website, which is done with Laravel 5. I use a very simple instruction, but I get an error 500. I am pretty sure that instruction is causing the trouble, as I don't get any error when it's commented.
The text editor I'm using is Sublime Text 3, which usually tells the location of the classes you use when you hover over them, but it's not the case for DB. However, I've gone to web\vendor\laravel\framework\src\Illuminate\Support\Facades and DB.php is there. So, I suspect there's something missing that does not allow Laravel to locate the resource.
The instruction I used is this. I've tried it with many variations, but all of them failed. Thus, I guess the problem is with DB, not with the method or the arguments.
DB::select('CALL my_stored_procedure');
And I have this at the top of the script.
use Illuminate\Support\Facades\DB;
I want to remark that I'm using other Facade (Input) in the very same script and it hasn't given any problem.
I have also checked that DB.php is using the proper namespace.
Thanks in advance.
P.S.: I know the title of the question is based on a speculation of what I suspect the real problem is, but I didn't know how to express it in any other way that didn't seem too specific.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire