rhysleesdev
rhysleesdev
FFilament
Created by raheel3031 on 1/28/2025 in #❓┊help
displaying address in filament form
As @Jo said, there is no content method in View, you should use ->view('path.to.blade.view') then define your content in the file https://filamentphp.com/docs/3.x/forms/layout/custom
7 replies
FFilament
Created by Arjen on 1/27/2025 in #❓┊help
Wizard loses $_GET param after next step
I believe you need to use Livewires #[Url] Attribute
use Livewire\Attributes\Url;

class Registration extends Register
{
#[Url]
protected string $type = 'inwoner';

public function mount(): void
{
parent::mount();
}

public function form(Form $form): Form
{
return $form
->schema([
$this->type === 'inwoner' ?
$this->getUserFormComponent() :
$this->getOrganizationFormComponent(),
]);
}
}
use Livewire\Attributes\Url;

class Registration extends Register
{
#[Url]
protected string $type = 'inwoner';

public function mount(): void
{
parent::mount();
}

public function form(Form $form): Form
{
return $form
->schema([
$this->type === 'inwoner' ?
$this->getUserFormComponent() :
$this->getOrganizationFormComponent(),
]);
}
}
5 replies
FFilament
Created by Patrick on 1/23/2025 in #❓┊help
Create record with custom creation date
Don't use the create page, instead create an action that creates the model. then use the edit form page to allow the user to edit. In ModelResource/Pages/ListModels.php
protected function getHeaderActions(): array
{
return [
Action::make('create')
->label('Create')
->color('primary')
->icon('heroicon-o-plus')
->action('createDraft'),
];
}

public function createDraft(): RedirectResponse | Redirector
{
$model = YourModel::create();

return redirect()->to(ModelResource::getUrl(
name: 'edit',
parameters: ['record' => $model],
isAbsolute: true
));
}
protected function getHeaderActions(): array
{
return [
Action::make('create')
->label('Create')
->color('primary')
->icon('heroicon-o-plus')
->action('createDraft'),
];
}

public function createDraft(): RedirectResponse | Redirector
{
$model = YourModel::create();

return redirect()->to(ModelResource::getUrl(
name: 'edit',
parameters: ['record' => $model],
isAbsolute: true
));
}
9 replies
FFilament
Created by 403gtfo on 1/27/2025 in #❓┊help
Table CSS for Livewire Page outside Filament
No problem 😄 , make sure you mark the post as solved 🙂
12 replies
FFilament
Created by 403gtfo on 1/27/2025 in #❓┊help
Table CSS for Livewire Page outside Filament
12 replies
FFilament
Created by 403gtfo on 1/27/2025 in #❓┊help
Table CSS for Livewire Page outside Filament
<!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>

@filamentStyles
@vite('resources/css/app.css')
</head>

<body>
@yield('title')
@yield('content')

@filamentScripts
@vite('resources/js/app.js')
</body>

</html>
<!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>

@filamentStyles
@vite('resources/css/app.css')
</head>

<body>
@yield('title')
@yield('content')

@filamentScripts
@vite('resources/js/app.js')
</body>

</html>
12 replies
FFilament
Created by 403gtfo on 1/27/2025 in #❓┊help
Table CSS for Livewire Page outside Filament
Can you share the layouts.app file
12 replies
FFilament
Created by qqq on 1/26/2025 in #❓┊help
Registration error
Ensure you have allowed access to the panel on the user model: https://filamentphp.com/docs/3.x/panels/users#authorizing-access-to-the-panel
3 replies
FFilament
Created by 403gtfo on 1/27/2025 in #❓┊help
Table CSS for Livewire Page outside Filament
You should follow all the Installation steps here: https://filamentphp.com/docs/3.x/tables/installation
12 replies
FFilament
Created by KingNii on 1/26/2025 in #❓┊help
Second Panel
You can use the --panel= flag when running a command for example php artisan make:filament-resource Customer --panel=second-panel
5 replies
FFilament
Created by mg on 11/21/2024 in #❓┊help
I want to build my own APIs which can be consumed by guest
@mg Ask in the official laravel server https://discord.gg/SqrSwQsj
4 replies