jeudi 31 janvier 2019

I need help to implement eloquent in a file in folder /public/

I need help to implement eloquent in a file in floder /public/ I have /public/js/ a file that calls another in php called getData.php, this file in php returns a series of data from a table, I want to access that data with Eloquent but I can not. This is part of a code "external" to Laravel and returns to declare the parameters of Database and I do not want to do it, I want to use eloquent to not have defined the parameters of the database twice.

I have used: namespace iPuerto; (application is called iPuerto) use Illuminate\Support\Facades\DB; but nothing at all.

I get this error: " Fatal error : Uncaught Error: Class 'Illuminate\Support\Facades\DB' not found in ..."

Can someone help me?

Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire