Questions tagged [laravel-9]

Laravel 9 is the former stable version of the open-source PHP web framework created by Taylor Otwell. It was released on February 8, 2022. Please use the [laravel] tag for general Laravel-related questions.

Laravel 9 requires the latest PHP 8 and PHPUnit 8 for testing. That’s because Laravel 9 uses the newest Symfony v6.0, which also requires PHP 8.

2126 questions
3
votes
1 answer

App.css and App.js still not found in laravel 9 after npm run dev

Quite new to Laravel and I made sure I did looked into the documentations of Laravel 9 before diving but incase I missed one, I have this issue wher app.css and app.js on the the link served by artisan are not found. Boostrap scaffolds are now in…
Jericho
  • 161
  • 1
  • 9
3
votes
3 answers

Laravel excel import could not find zip error

I installed Laravel excel and created a form. I have completed all the configurations related to Laravel excel. I select and upload my excel file in the form I created, and then I get the following error. PHP Version: 8.1.7 Laravel Version:…
alihancibooglu
  • 167
  • 2
  • 10
3
votes
1 answer

Connection to "process /usr/sbin/sendmail -bs" has been closed unexpectedly

I have updated my Laravel version 5.4 to version 9. After that, the project is working fine, apart from sending emails. Connection to "process /usr/bin/sendmail -bs" has been closed unexpectedly
3
votes
1 answer

Laravel Livewire: Temporary Preview Urls Not Working on Local Machine

I tried uploading the file via Laravel Livewire using Livewire\WithFileUploads and I tried to get the preview of the image selected, to be uploaded, by implementing the method shown in the official documentation of livewire, but inspite of doing…
Rajveer
  • 31
  • 5
3
votes
2 answers

Laravel 9 - Passport custom api for Authorization

In my application, I am using Passport for Authentication. I have created a Password grant client for generating access tokens for our mobile and web app. Now I have to add a third-party client that can access some of our resources. For this, I…
Sunny Kumar
  • 534
  • 12
  • 35
3
votes
1 answer

Failed to execute 'replaceState' on 'History': # could not be cloned
I have this Jetstream Laravel application, which has a presence channel set up for chat features. What's happening is: When I join the channel and send a message there, everything works fine, except when I try to exit the channel. In every…
3
votes
1 answer

Laravel 9 mutators colon

In Laravel 9, there’s a different implementation for mutators. The following example is from the official documentation. protected function firstName(): Attribute { return Attribute::make( get: fn ($value) => ucfirst($value), …
3
votes
1 answer

laravel 9 scheduled job executed but not queued

I recognised a strange behavior after upgrading laravel from 8 to 9. I have a scheduler that executes some jobs. Kernel.php: $schedule->job(new ImportAzApplications, 'imports') ->everyFiveMinutes() ->onOneServer() ->onFailure(function ()…
3
votes
4 answers

Php artisan make:auth not defined in Laravel 9

When I am trying to run this command php artisan make:auth... The following error comes. Is there any way to run this command, or any alternative for this command, should I Install amy package for this command? Command "make:auth" is not…
Stranger
  • 31
  • 1
  • 1
  • 3
3
votes
1 answer

Subdomain for Laravel Rest API not working correctly - IONOS using Plesk

I've got a VPS with IONOS (was 1&1) and running Plesk Obsidian and I am up to date using Laravel 9. Now I've hit a snag, all I want to do is add a simple subdomain :- api.trolleyspotting.fun So what would be…
3
votes
3 answers

syntax error, unexpected identifier enum laravel

I am using LARAVEL 9. I am create enum in Enum folder and access in model. But when i am adding data i am getting this error syntax error, unexpected identifier "GenderEnum" Here is my code GenderEnum.php
Rishab Goyal
  • 39
  • 1
  • 2
3
votes
1 answer

Laravel Composite Key Validation

I have a table where there is a composite uniqe key. I want to validate it before creating the record, so the HTTP request won't return with some SQL error(Integrity constraint violation: 1062 Duplicate entry). I'm using Laravel 9. The composite…
Gábor Stefler
  • 41
  • 1
  • 1
  • 7
3
votes
1 answer

Pass multiple optional parameters in Laravel 9

I am trying to create a route that takes either one of two parameters. However the dd returns me $b_id, null instead of null, $b_id. How can I pass only b as a parameter and omit a? web.php Route::get('myroute/{a?}/{b?}', [MyController::class,…
pnonnen
  • 39
  • 1
  • 9
3
votes
2 answers

SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint laravel 9

Trying to assign foreign key but when you run migrate, I get this this error, I do not understand what the problem is. SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table categories add constraint…
Mohsen Gorzin
  • 186
  • 1
  • 10
3
votes
2 answers

Get S3Client from storage facade in Laravel 9

I am trying to upgrade an S3 Multipart Uploader from Laravel 8 to Laravel 9 and have upgraded to Flysystem 3 as outlined in the documentation and have no dependency errors https://laravel.com/docs/9.x/upgrade#flysystem-3. I am having trouble getting…
Kerkness
  • 329
  • 4
  • 9