Skip to content
Advertisement

Tag: laravel-7

Own booking script

I’m making my own booking system and the main script that denies storing data in DB is not working. The script itself:

Column not found 1054 error when defining laravel relationship

I have two tables: Order and Order_details. Between these two tables, there is a one-to-many relationship. Order fields are: id_order invoice customer_id user_id total Order_details fields: order_detail_id order_id product_id qty price order_id is a foreign key which references to id_order on orders table Order Model Order_detail model When i tried to insert data to these table, i got an error

Missing required parameters for [Route: questions.update] pass 2 parameters in the url

guys i have a problem when passing two parameters in the url that is in file web.php That’s my error I used Route::resource(‘/exams/{exam}/questions’, ‘BackendQuestionController’); to define the default routes. In the terminal looks like: And to redirect, it is written this way And the Controller.php But I can’t understand why it fails, if I’m already passing the parameters indicated by

Resource Controller Concept

I am unable to find the issue. It is showing 404|Not Found update.blade.php PostController.php (a resource controller) route: please tell me what is the issue in this. one of the advice I got is to change the name of view file i.e update.blade.php to edit.blade.php. I don’t know how does it help Answer First you should change edit.blade.php instead of

Laravel 7 – paginate sorted by DESC

I’m trying to display posts from the database, but i want to have the latest on top. This means I have to do this inside of my HomeController.php: But when the site grows up, it might be complicated to find the particular post, so I decided to implement pagination. Unfortunately, pagination only works when I use this statement: When I’m

Advertisement