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
6
votes
2 answers

Laravel 9 require laravel/ui to use Auth::routes

I am upgrading my project to Laravel 9. However, when I tried to run php artisan, I got an error message. In Auth.php line 60: To use the Auth::routes() method, please install the laravel/ui package. So I install the package, but I still get the…
Aryabhima A. Rahman
  • 375
  • 1
  • 5
  • 10
6
votes
10 answers

Laravel Composer could not install tymon/jwt-auth

Please assist, composer could not install tymon/jwt-auth:0.5.* I had type : composer require tymon/jwt-auth:0.5.* i also tried to add the ff in projects composer.json: require { .... "tymon/jwt-auth": "dev-master", .... } and…
Neo Sono
  • 186
  • 1
  • 4
  • 18
5
votes
5 answers

How to add Flowbite Tailwind plugin to my Laravel 9 + Vite project?

I tried adding flowbite to my Laravel project. I am using Laravel version 9 with Vite. So far, I did the following steps: Installed flowbite as a dependency: npm i flowbite Added plugin in tailwind.config.js: plugins: [ …
Neha
  • 2,136
  • 5
  • 21
  • 50
5
votes
2 answers

Unable to retrieve the file_size for file when using Storage::fake for testing

I just upgraded my app from Laravel v8 to v9. Now I'm having an issue with the following code throwing this error: League\Flysystem\UnableToRetrieveMetadata : Unable to retrieve the file_size for file at location: test_file.xlsx. My…
huffy2404
  • 61
  • 1
  • 3
5
votes
3 answers

Laravel 9 on PHP 8.1 slow responses - out of the box

I am using out of the box Laravel 9 / php 8.1 combo and loading initial page for 190ms sounds horrible. Last project I built used laravel7 and the response times in development including database queries - talking complex ones were less than…
dev
  • 735
  • 2
  • 15
  • 31
5
votes
5 answers

Laravel 9 SymfonyMailer error - An email must have a "To", "Cc", or "Bcc" header

I've got problems with sending emails after updating a Laravel 8 project using the Metronic 8 theme to Laravel 9. I didn't change any of my code related to emails, but now I got this error using the Sendmail driver : An email must have a "To",…
Ankh
  • 61
  • 1
  • 7
4
votes
1 answer

Object of type Illuminate\Auth\AuthManager is not callable

As part of API development, I use Laravel 9 and use "php-open-source-saver/jwt-auth" package for authentication without tokens. The API works fine, but I get an error when I add the following line to the controller $this->middleware('auth:api',…
4
votes
3 answers

403 Forbidden error is received on file upload

I'm trying to upload a file in my Laravel 9 application. On the localhost, it works just fine, however, the same action fails when I try it from my application running on an Amazon Linux EC2. What I know: The action does not throw any exceptions,…
farjam
  • 2,089
  • 8
  • 40
  • 77
4
votes
3 answers

Unable to locate file in Vite manifest: resources/sass/app.scss

I have installed laravel 9 and livewire. When i try to open login or registraration page from top corner it's showing this error Can you tell me something how can i fix this one
ST Tech
  • 41
  • 1
  • 1
  • 2
4
votes
1 answer

the date is not formatted in the export

Laravel Excel: the date is not formatted in the export When I try to export, the date in Excel is shown to me as: YYYY-MM-DD. What I want to get is the date in the following format: DD/MM/YYYY. Going into detail, I have the columns shown in the…
Sarah
  • 292
  • 1
  • 10
4
votes
3 answers

How to translate Laravel "hardcoded" string "(and 1 more error)", using dynamic translation key..( Validation Exception class )

I have some validations in place, and I am validating it like this: and I noticed when there is more than 1 error, laravel will add to the message "and 1(or 2 or 4..) more error(s)" .. Take a look at the images and you will see what I mean: I…
Pablo Camara
  • 460
  • 4
  • 13
4
votes
1 answer

Why is PHP-FPM performance better than Octane?

I setup a clean Laravel 9 project. I then setup Octane with RoadRunner. I run it on a VirtualBox VM in a Windows 11 host. My PC: CPU: Ryzen 5 3600 RAM: 32GB - 2x16GB DDR4 3200Mhz CL16 Storage: Samsung 970 Evo (Not plus), 500GB The VM: CPU: 4…
pileup
  • 1
  • 2
  • 18
  • 45
4
votes
4 answers

Method Laravel\Passport\Guards\TokenGuard::attempt does not exist

In Laravel 9, I am trying to hit the login API with the custom guard client, I am getting the following error. Please help. BadMethodCallException: Method Laravel\Passport\Guards\TokenGuard::attempt does not exist. config/Auth.php 'guards' =>…
Muhammad Owais
  • 980
  • 3
  • 17
  • 37
4
votes
2 answers

Laravel 9: how to insert data using raw sql while doing a migration?

I've a "static" table I need to import while doing initial migrations on my project. I've a .sql file. It's a lot of data, > 35k records My idea was to create table in a standard migration and then, with "something" execute the insert sql I already…
realtebo
  • 23,922
  • 37
  • 112
  • 189
4
votes
0 answers

Laravel Vue3 and Vite Rollups - Fails dynamic imports

I've been spending some time rewriting an application to Laravel 9 with Inertia, Vite, Vue3 Composition API, and Typescript. Everything went good and when I tested the production build on my local environment by running npm run build everything…
ii iml0sto1
  • 1,654
  • 19
  • 37