Skip to content
Advertisement

Tag: laravel

Freshly generated DuskTestCase.php throws “Undefined type ‘TestsCreatesApplication'”

I’m trying to set up Laravel Dusk to test my Laravel site as part of a larger Github Action CI/CD workflow. Following the documentation, I ran: The latter command created a tests/Browser directory and a tests/DuskTestCase.php file. The problem is that when I open up DuskTestCase.php Intelephense immediately complains: I also get a slightly different, but clearly related, error when

composer require s-ichikawa/laravel-sendgrid-driver failed in laravel 8.54

I downloaded the latest laravel framwork 8.54 and tried to install composer require s-ichikawa/laravel-sendgrid-driver, but it failed. is there any solution? Answer It looks like version 4 of s-ichikawa/laravel-sendgrid-driver requires version 9 of illuminate/mail, but Laravel 8.x uses version 8.x of illuminate/mail. Can you try to install version 3 of s-ichikawa/laravel-sendgrid-driver instead?

How to get file input name in Laravel?

I am using a jQuery form builder to create any kind of form input. The issue I had, in particular, is when I create multiple file inputs, the input name is generated randomly by default, the format is something like “file-0000-0”. I would like to get the input name but since it’s random, I can only think of one way

Laravel Join If Column Value Not Null

I try this method. I want to select discount if withCode value False. I try in where clause but in this method, if not false; I can’t access product. I want to select discount if withCode table FALSE. Else, I don’t want to select it Answer I solved with this codes;

Laravel Mail Connection could not be established Mailhog

I’ve installed Laravel Breeze and the ‘forgot password’ functionallity does not work. Login and registrer both work well, so I guess there is something wrong at sending the recovery email. This is the displayed error: at Symfony  Component  Mailer  Exception  TransportException. and here is an screenshot: error This is part of my .env file: The environment is: Ubuntu 21.10 Laravel 9.7.0 PHP 8.0.8 Tested

Laravel 9.x Contact form can’t connect to class

I’m trying to make a contact form. Main idea is user will send data, I will save the data to database, I will get the data from database, I will send the data as an email. I was following a tutorial -> https://www.positronx.io/laravel-contact-form-example-tutorial/ When I tried to reach classes on my controller it can not find it. Controller says this

Getting rid of numbers in a json response ( LARAVEL 9 )

i’m having some problems with my json response. When I make an api call from a user (id:1) it returns the response well, but if i change the user (f.e id:2) it returns it with some identifiers on it. Any idea? Response from id:1 Response from id:2 Thanks! EDIT 1 This is how I am getting the response: Answer Right

Advertisement