In my laravel 8 app I am trying to create two files CreateUserRequest and updateUserRequest to use personalized validations. In the method rules I´m calling my model’s variable $createRules but when I send my form, this don´t send, don´t show messages, error… Nothing. I have attached CreateUserReq…
Tag: laravel-8
Laravel 8: Property [name] does not exist on this collection instance
I’m working with Laravel 8 to develop my project and in this project, I have a table named hostings which it’s migration goes here: And now I want to return some results from the DB and show them on blade, so I added this: But now I get this error: So what is going wrong here? How can I fix
Cannot passing data to views
I’m using laravel 8 to make pass data to views pages. Unfortunately i have error saying ‘ Target class [PagesController] does not exist’ on my browser So here’s my PagesController.php Web.php index.blade.php i want to pass the variable $title to index.blade.php but have error. Tried so…
inserting user in database from regitration form laravel 8
i am working on a e-commerce website using laravel 8 for the first time i created a login and registration views, when i try registering first it flashed iccorrect email adresse in session error that is displayed in register.blade.php after fixing that it redirected me to an error page with this text : my rou…
Improve eager loading with multiple relationships of the same type
I have the following model: When I do Message::with([‘sender’, ‘receiver’])->all(), eager loading executes the following queries: That’s almost the least redundant way possbile. But it still loads user 3 and user five two times. Is there a way to further improve this using elo…
How to match input credentials with database credentials without typing them in laravel 8?
I have the credentials username, phonunmber, password and device serial number saved in my phpmyadmin database. I want to input the username, phonunmber and password and if all of them matches with device serial number in the databse, then the user can log in. How can i do that? P.S device serial number is sa…
Laravel : Fetch contact form data into notification facade mail
Just made a contact me form on my website and I would like to send an email to the website’s admin when someone sends a message. I’m using the Notification Façade in Laravel to do so, I managed to send the email but I can’t fetch the contact form’s data in the mail. How can I achieve t…
Laravel 8: delete() does not delete from the DB
I’m working with Laravel 8 to develop my forum and I wanted to add some Like and Unlike functionality to question that have been asked by users. So Like function works fine but for Unlike, I got some problem. Here is the method for Unliking: And here is the form behind this: So the problem is it does no…
Laravel 8: Call to a member function user() on array
I’m working with Laravel 8 to develop my forum project, and I wanted to add some like functionality to question that has been asked on forum by users. So here is a form on question.blade.php: And then at LikeController, I added this: But now I get this error: Which is referring to this line: So what is …
how can I count same products in order table in laravel eloquent? I`m new Laravel user
Here is my Orders table . How many same product are sell. I needed Answer You can write your query n LARAVEL Eloquent in this way.