-
Notifications
You must be signed in to change notification settings - Fork 92
Closed
Labels
Description
Flux version
last
Livewire version
last
Tailwind version
last
Browser and Operating System
chrome
What is the problem?
Bug on use: php artisan optimize
Code snippets to replicate the problem
Livewire\Blaze\Exceptions\InvalidBlazeFoldUsageException
Invalid @blaze fold usage in component 'C:\laragon\www\vendor\livewire\flux-pro\src/../stubs/resources/views/flux/pillbox/search.blade.php': Components accessing $errors should not use @blaze fold as errors are request-specific
at vendor\livewire\blaze\src\Exceptions\InvalidBlazeFoldUsageException.php:42
38▕ }
39▕
40▕ public static function forErrors(string $componentPath): self
41▕ {
➜ 42▕ return new self(
43▕ $componentPath,
44▕ '\\$errors',
45▕ 'Components accessing $errors should not use @blaze fold as errors are request-specific'
46▕ );
1 vendor\livewire\blaze\src\Folder\Folder.php:154
Livewire\Blaze\Exceptions\InvalidBlazeFoldUsageException::forErrors("C:\laragon\www\vendor\livewire\flux-pro\src/../stubs/resources/views/flux/pillbox/search.blade.php")
2 vendor\livewire\blaze\src\Folder\Folder.php:77
Livewire\Blaze\Folder\Folder::validateFoldableComponent("@blaze
@props([
'placeholder' => null,
'clearable' => true,
'closable' => null,
'icon' => null,
])
@php
// Clerable or closable, not both...
if ($closable !== null) $clearable = null;
$classes = Flux::classes()
->add('h-10 w-full flex items-center px-3 py-2')
->add('font-medium text-base sm:text-sm text-zinc-800 dark:text-white')
->add('ps-9') // Make room for magnifying glass icon...
->add('pe-9') // Make room for clear/clos button and loading indicator...
->add('outline-hidden')
->add('border-b border-zinc-200 dark:border-zinc-600')
->add('bg-white dark:bg-zinc-700')
// The below reverts styles added by Tailwind Forms plugin
->add('border-t-0 border-s-0 border-e-0 focus:ring-0 focus:border-zinc-200 dark:focus:border-zinc-600')
->add('data-invalid:text-red-500 dark:data-invalid:text-red-400')
;
$name = $attributes->whereStartsWith('wire:model')->first();
$invalid ??= ($name && $errors->has($name));
$loading = $attribute...", "C:\laragon\www\vendor\livewire\flux-pro\src/../stubs/resources/views/flux/pillbox/search.blade.php")Screenshots/ screen recordings of the problem
..
How do you expect it to work?
..
Please confirm (incomplete submissions will not be addressed)
- I have provided easy and step-by-step instructions to reproduce the bug.
- I have provided code samples as text and NOT images.
- I understand my bug report will be closed if I haven't met the criteria above.
Reactions are currently unavailable