Skip to content
Advertisement

Tag: laravel

Laravel Http request to route sends forever

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,

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: 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

Advertisement