I’m new to Laravel and I’m trying to store a form. I created the view with the House controller but now I want to store the data in the view with the Booking controller. But when I click the button nothing happens. My question is if it is possible to make a view with one controller and store it with
Tag: model-view-controller
TwigLoaderFilesystemLoader not found when triggering 404 error
I’m new to OOP and MVC with PHP, and I’m currently learning by making my own custom MVC app for testing purposes. I’m not using Symfony yet, but I’ve integrated Twig and I have a problem with it when I call a 404 error outside a controller, in the two following cases : When requested page doesn’t exist on server
How to upload file into folder after saving form
I am trying to upload files through this form but it’s only saving the name of the file into the database. I want that when the form submit then the file is uploaded to the destinated folder and the form submitted successfully, below I have provided both view and controller code Form view code: Form controller code: Answer
Should Controller Layer cannot use Repository Layer?
I’m confused about Controller use Repository directly. Is it Repository layer must encapsulated by Service layer? I’m using like this now in Laravel: Is is Bad to use Repository Layer directly from Controller Layer? Answer Note: In regard of MVC-based applications, this answer is a general one. It does not refer to Laravel, in particular. The controller: In a proper
CakePHP4 Edit doesnt update record
Version: 4.2.9 My edit view is populating my inputs with the data, but when I change them and click on save, its not saving but giving me “user has been saved” message. UsersController.php edit function my edit.php Answer Your update code is not complete, you have omitted the patchEntity method.
Passing more than one variables from different controllers to a single view in Laravel 8
I need to pass two variables from two different controllers to a view and display the different values from the array variables to two different html form’s select options in Laravel 8. But Laravel doesn’t seem to allow pass two differnt variable to a single view. How do I slove this? Please find the error screenshot from this link. Controllers
php mvc url pattern which takes three arguments
I’m new to MVC. what I’ve learned from a few articles and some videos is that the general form of URL in MVC structure is as controller/action. but I’ve come across some URLs like this: www.exmaple.com/users/login/confirm which takes three parameters(users, login, confirm). I don’t understand which one is the controller, which one is the action, and what the third parameter
How to show array data form controller in blade file (html table)? Laravel
Since I am completely new in Laravel, I have a problem pretty complicated for me. I have controller file ApiHandlerController like this: myview.blade.php as a view file: And web.php file with route: My question is: How to show result of todos from jsonplaceholder.typicode.com in this blade (view) file? Currently, it’s not possible, and every time I try this is an
redirect to 404 page instead of Fatal error: Uncaught ArgumentCountError: Too few arguments to function
I made an MVC framework for training, and I get this error and I’m not sure what is wrong with my function. when I open link like this : http://mvctrav.com/posts/show/6 it show me the post but when deleting the id like this http://mvctrav.com/posts/show/ it shows me the error My error looks like this: and my function is : this is
how can I download my file residing in local repository
I am new to CodeIgniter and was working on downloading a file. However, I want to download a file that resides on my local machine, I am able to locate the file by providing the path, also the file gets downloaded with a File type, However, I want my file to be in .csv format Here goes my Controller’s download