I want to have a link in an email that send to the user, the link is the url of the site and has an api token for the user to authenticate with. however I am trying to send an api request to get the user details so I can authenticate the user and redirect them to the relavent page,
Tag: laravel
How to update profile with current image when an image file is not chosen in the edit form? I am using Laravel 8
Whenever I try to only save profile changes for the profile description and url in the edit form, I get an error because I didn’t choose an image file also. I would like to be able to update a profile with current image when an image file is not chosen in the edit form. The error I keep getting is:
Trying to output a filename through a one to many relationship in Laravel
I am getting the error call to a member function documents() on boolean As I am trying to get the filename of the uploaded document for a card. I have created a relationship between Cards and CardDocuments: Cards.php: CardDocuments.php: After doing that I used this in the view: And the card_document migration: Not sure why this is showing a boolean
Variable and function types in PHP 7.4 (laravel) [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed last year. Improve this question Yesterday I was at an interview and after looking at my code I was told that I did not have enough typing, I still cannot
Feature test for HTTP RESTful API on Laravel 8
I’m trying to write a feature test in RESTful API that I have been created in laravel 8. I have ChatController that gets user chats by getUserChats method: that called by this route: this is my feature test on this route: the test runs successfully by this green output OK (1 test, 3 assertions) but I don’t know this is
Laravel 8: Method IlluminateDatabaseEloquentCollection::update does not exist ERROR
I want to update some data from the DB, so I added this Controller method: Now the problem is I get this error: So how to solve this issue? Answer You are already resolving $anss using route-model binding. You are trying to call findOrFail with a model as an argument, which since Model implements Arrayable will return a Collection, thus
Laravel 8: Argument 2 passed must be an instance of
I’m working with Laravel 8 to develop an Online Forum. And I made this form for updating an answer of a user: And here is the route for this: And this is also the Method of QuestionController: But now the problem is, whenever I submit the form in order to update answer, I get this as error: Argument 2 passed
Changing date format – Laravel
I have a column in my table named expiry which has type VARCHAR. In the column, there is a mixture of date format like YYYY-MM-DD and MM-DD-YYYY. How can i re-arrange the format MM-DD-YYYY to YYYY-MM-DD in my laravel view blade ? View In the view above, it throws an error Could not parse ’02-27-2021′: DateTime::__construct(): Failed to parse time
Sending mail with no required attachment Laravel 8
I’m working on a project in Laravel 8. I make a contact form that will be sent to my email address and contains name, email, message and attachment. Name, email and message are required but no attachment. When I send the form completely filled in (name, email, message and attachment) everything works fine and the message comes to my email
Laravel 8 file upload validation fails with any rule
I want to validate a file upload but with literally any validation rule, I get “The (name of input) failed to upload.” I’ve seen this issue in a few places but none of the solutions worked for me. I’m using Laravel 8.0, php 8.0.2, and nginx/1.18.0 on ubuntu. Controller: Blade file: If I get rid of the validation rule for