FilamentF
Filament14mo ago
Cem

Help with form outside Panel

I'm learning Filament / Laravel so apologies if it's a stupid question. I have bought the minimal theme; works great within the Panels but i want to create a simple page with just the form.

The form displays nicely but i'm missing some scripts

Here's my controller
<?php

namespace App\Http\Controllers;

use Filament\MinimalTheme;
use Illuminate\View\View;

class PublicAnamneseController extends Controller
{
    public function create(): View
    {
        MinimalTheme::make();
        return view('anamnese.create');
    }
}


The view:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Anamnese Form</title>
    @filamentStyles
    @vite('resources/css/app.css')
    @livewireStyles
</head>
<body class="bg-white">
<div class="min-h-screen max-w-7xl mx-auto px-4 py-12">
    <div class="max-w-6xl mx-auto px-6 py-8">
        <livewire:public-anamnese-form/>
    </div>
</div>
@livewireScripts
@filamentScripts
@vite('resources/js/app.js')
</body>
</html>

and the service provider
<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Livewire\Livewire;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        Livewire::component('public-anamnese-form', \App\Livewire\PublicAnamneseForm::class);
    }
}
CleanShot_2024-11-11_at_15.53.202x.png
Was this page helpful?