I am getting an error for the custom filament page

Hi i just made the new filament page i make it with command
php artisan make:filament-page Statistics --type=custom
php artisan make:filament-page Statistics --type=custom
but for some reason i am getting the errors in console for the livewire i do not know is that because i do not have the record for mine page or i do not know code for mine page is down below statistics.blade.php
<x-filament-panels::page>
<x-filament-panels::form wire:submit="save">
{{ $this->form }}
<x-filament-panels::form.actions :actions="$this->getFormActions()" />
</x-filament-panels::form >
</x-filament-panels::page>
<x-filament-panels::page>
<x-filament-panels::form wire:submit="save">
{{ $this->form }}
<x-filament-panels::form.actions :actions="$this->getFormActions()" />
</x-filament-panels::form >
</x-filament-panels::page>
No description
7 Replies
mile4841
mile48414d ago
code for the
class Statistics extends Page implements HasForms
{

use InteractsWithForms;

protected static ?string $navigationIcon = 'heroicon-o-document-text';

public ?array $data = [];

public static function getSlug() :string
{
return __("statistics-slug");
}

public static function getNavigationLabel(): string
{
return __("statistics-heading");

}

public function getHeading() :string
{
return __("statistics-heading");
}

protected static string $view = 'filament.pages.statistics';

public function mount()
{
$this->data = [
"type_report" => "true",
"time" => "interval",
"start_date" => Carbon::now()->subDays(30),
"return_date" => now(),
];
$this->form->fill([
"type_report" => "true",
"time" => "interval",
"start_date" => Carbon::now()->subDays(30),
"return_date" => now(),
]);
}
class Statistics extends Page implements HasForms
{

use InteractsWithForms;

protected static ?string $navigationIcon = 'heroicon-o-document-text';

public ?array $data = [];

public static function getSlug() :string
{
return __("statistics-slug");
}

public static function getNavigationLabel(): string
{
return __("statistics-heading");

}

public function getHeading() :string
{
return __("statistics-heading");
}

protected static string $view = 'filament.pages.statistics';

public function mount()
{
$this->data = [
"type_report" => "true",
"time" => "interval",
"start_date" => Carbon::now()->subDays(30),
"return_date" => now(),
];
$this->form->fill([
"type_report" => "true",
"time" => "interval",
"start_date" => Carbon::now()->subDays(30),
"return_date" => now(),
]);
}
mile4841
mile48414d ago
public function save()
{
try{
dd($this->form->getState());
}
catch(Halt $er){
return;
}
}

public function getFormActions() :array
{
return [
Action::make('save')
->label(__('inputs.statistics-btn'))
->submit('save'),
];
}
public function save()
{
try{
dd($this->form->getState());
}
catch(Halt $er){
return;
}
}

public function getFormActions() :array
{
return [
Action::make('save')
->label(__('inputs.statistics-btn'))
->submit('save'),
];
}
LeandroFerreira
return $form
->statePath('data')
->schema([
...
return $form
->statePath('data')
->schema([
...
mile4841
mile48414d ago
thanks bro it is working Is that in the docs?
mile4841
mile48414d ago
okay thanks
Want results from more Discord servers?
Add your server