dimanche 8 mars 2020

Is there any way to bypass using database in Laravel

I'm using Laravel version 7.x where having trouble to access a property value inside my view template. It's showing the following exception:

Trying to get property 'image_name' of non-object (View: F:\Laravel\doorsoft_job_assignment\resources\views\images\image-list.blade.php)

And showing me solution:

Database name seems incorrect You're using the default database name laravel. This database does not exist. Edit the .env file and use the correct database name in the DB_DATABASE key.

I have attached the exception & solution to have a more clear view as image.

Here is the image

Anyway, I'm passing data to view from a .json file. Where array of objects contains on that .json file. I'm returning data from that file instead of via Model. I don't want to use Database for CRUD

Note: I have already searched similar problem and found something to set DB_DATABASE = unused to fix the problem from this answer but that solution not fixed my problem.

Can anyone help me? Thank you in advanced.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire