I’m making my own booking system and the main script that denies storing data in DB is not working. The script itself:
Tag: laravel-7
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
Can’t access the Auth::user() from a custom route file ? Laravel 7
For a purpose i decided to create a separate routing file for the admin and separating its logic from the web.php but instead i am facing this issue : ps: the admin.php is registered in the RouteServiceProvider Answer Add web middleware
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
Directory issue in laravel
As I am leaning laravel I am facing directory issues. I have made a navbar in which a create option is given to access the create file which is located in my resources/views/posts/create directory. …
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
How can I display my products from the cart?
I am using Melihovv ShoppingCart. I want to display all products inside cart but I couldn’t. It shows the page but the products are not displaying. Here is my code And here is my view: Answer to display the content of the cart, I think you should use
Laravel graceful end event-listener within a request
Within my controller I am creating a message which then fires an event after a successful message create: public function store(Conversation $conversation, Request $request) { $message = Message::…
Change column name in Laravel equivalent
I am beginner in Laravel. I have this code: $data = Term::whereDate(‘begin_date’, ‘>=’, $start)->whereDate(‘end_date’, ‘get([‘id’,’name’,’begin_date’, ‘end_date’]); This is …
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