vendredi 23 février 2018

Laravel - How to do connect database in config file

ı have some data which getting them from client. And I need to save this data in config file..

But I can't use my model in database because when I said that $settings = \App\Twittersettings::find(1); it gives me this error;

Call to a member function connection() on null

As I understand that from this error, I dont have db connection yet. After that, I tried connection method but it gave me same error too;

 DB::connection('mysql');

So, what is your advice ? Thanks for your all help..



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2HGSaq9
via IFTTT

Aucun commentaire:

Enregistrer un commentaire