Skip to content
Advertisement

I can not store info in DB in Laravel 7

I have an issue with store info into the MySQL database, and I try to change the method that stores info into DB, but it still the same problem. Moreover, I need your help to figure out the problem and solve it.

PostController

JavaScript

Post Model

JavaScript

Form

JavaScript

I appreciate your effort to help me, and thanks in advance.

Advertisement

Answer

To get the file of the request object you can access it via file() method. And why are you not using method injection for the request

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement