-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Closed
Description
Laravel Version
12.21.0
PHP Version
8.4.10
Database Driver & Version
n/a
Description
This commit breaks cookie setting for the application if there is a period in the APP_NAME
Steps To Reproduce
Laravel Installer 5.16.0
- laravel new bugreport
- No starter kit
- composer require livewire/flux
- artisan livewire:layout
- Add flux blade directives
- artisan make:livewire Counter
- Add a route: Route::get('/counter', \App\Livewire\Counter::class);
- Increment button works nicely
- Change APP_NAME to "Laravel.com"
- Button breaks with a 419 expired every time
app.blade.php
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ $title ?? 'Page Title' }}</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
@fluxAppearance
</head>
<body>
{{ $slot }}
@fluxScripts
</body>
</html>Counter.php
<?php
namespace App\Livewire;
use Livewire\Component;
class Counter extends Component
{
public $counter = 0;
public function increment(): void
{
++$this->counter;
}
public function render()
{
return view('livewire.counter');
}
}counter.blade.php
<div>
<div class="text-4xl">{{ $counter }}</div>
<flux:button variant="primary" wire:click="increment">Increment</flux:button>
</div>web.php
<?php
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
});
Route::get('/counter', \App\Livewire\Counter::class);Metadata
Metadata
Assignees
Labels
No labels