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
4
votes
3 answers

Why does Laravel9/Vite application not find the assets files after build

Having built the assets, build vite build vite v3.0.3 building for production... ✓ 64 modules transformed. public/build/manifest.json 0.28 KiB public/build/assets/app.45719a2b.css 189.82 KiB / gzip: 26.83…
Howard1471
  • 43
  • 1
  • 6
4
votes
3 answers

Default Laravel + Vite configuration throws WebSocket connection to failed:

So Laravel decided to innovate once again and fix what was not broken, so Mix is gone and now default asset bundling goes with Vite. I'm following the absolute default in their documentation to a bunch of front-end bugs and finally only several…
OurBG
  • 507
  • 1
  • 8
  • 22
4
votes
1 answer

Cannot send emails using Laravel 9

I recently updated to Laravel 9 and now I am no longer able to send emails. In the update log its written that they switched mailer from SwiftMailer to Symfony, so maybe this is the root of the problem. This is the body of the error that I get…
John Baker
  • 73
  • 10
4
votes
1 answer

Catching failed email recipients in Laravel 9 (Symfony Mailer)

I have recently upgraded my Laravel application from 5.8 to 9.x. In the previous version of Laravel, mail transport was done by SwiftMailer. But now in Laravel 9, it uses SymfonyMailer. To get the failed recipient list, Mail::failures() was used,…
4
votes
2 answers

Get hyperlink URL in Laravel Excel 3.1 using Excel::import

I am importing Excel Sheet using Excel::import Maatwebsite / Laravel Excel 3.1. Controller $sheet = Excel::toArray(new UsersImport(), $request->file('stock_file'), null,\Maatwebsite\Excel\Excel::XLSX); UserImport.php use App\Models\User; use…
Nilesh patel
  • 1,216
  • 2
  • 14
  • 38
3
votes
2 answers

Is it possible to override a dependency injection from a package?

I'm creating a package and want to override the Migrate command but cannot seem to figure out how. It seems like Laravel itself is getting a higher priority over my ServiceProvider, is there a way to gain priority in the override and get my custom…
K1ll3rM
  • 169
  • 8
3
votes
1 answer

Can I use a constructor in Laravel's Form Request class?

I'm trying to use a constructor inside my CreateLeadRequest class, but it seems to be failing. class CreateLeadRequest extends FormRequest { private $dealer; public function __construct() { parent::__construct(); $this->dealer…
farjam
  • 2,089
  • 8
  • 40
  • 77
3
votes
3 answers

PuPHPeteer php bridge package unable to install on Laravel 9

This package nesk/puphpeteer has been archived and doesn't work with Laravel 9 anymore. There are however forks that I believe will work with Laravel 9 since the dependencies in the composer errors have been updated in the forks. I tried these…
dfeva
  • 81
  • 2
  • 11
3
votes
0 answers

Code in Laravel AppServiceProvider halts Composer & build when deploying via DeployHQ

I have the following code in my AppServiceProvider.php file:
Andy Holmes
  • 7,817
  • 10
  • 50
  • 83
3
votes
1 answer

How to get error validation data in Custom Form Request

I have created a custom request form for login validation, It works fine if I put email and password field that's what I set for rules, email and password is required, but the problem is, I can't use the errors data, /** * Signin…
3
votes
1 answer

Laravel Validator::validateDecimal does not exist

I don't know how this error could happen because I am running laravel 9.28.0 which does have the validateDecimal validator and it is not a custom validator. https://laravel.com/docs/9.x/validation#rule-decimal here is my…
3
votes
2 answers

Mix manifest not found on laravel 9 - vite

I have the problem when i run npm run build , it says mix manifest not found. It happens when i run in production. My npm -v is 9.1.2 and running laravel 9, with "php": "^8.0.2". Have anyone ever got this problem? I already try any suggestion to…
3
votes
4 answers

Auth::attempt return true, Auth::check() return false

I'm using Laravel 9 authentication. It's a successful login, but on the main page, it is not logged in. So I'm expecting it to authenticate. Login controller if (Auth::attempt([ 'x_username' => $data['username'], 'x_user_password' =>…
Lezir Opav
  • 674
  • 3
  • 6
  • 21
3
votes
1 answer

Global React component in InertiaJS's createInertiaApp method

How do I go about adding a global component (e.g. ) to InertiaJS's createInertiaApp() method in Laravel 9? createInertiaApp({ title: (title) => `${title} - ${appName}`, resolve: (name) => resolvePageComponent(`./Pages/${name}.jsx`,…
AndrewL64
  • 15,794
  • 8
  • 47
  • 79
3
votes
2 answers

ReflectionException PHP 8.1.2 Laravel 9.24.0 Function () does not exist

I've just started to use __invoke magic method in Laravel 9. Have been following the laravel 9 documentation and doing as what documentation suggests. I got this Function () does not exist error. I have even created the InvokeServer controller using…
che
  • 61
  • 1
  • 11