Edit only single record with custom page

hi! im newbie in filament and php(laravel), so my question is next:
can you explain to me please how i can do edit page like there (https://laraveldaily.com/post/filament-edit-only-single-record-custom-page) but with filament 2.x
on our project we use exactly it.
for now i created a custom page via command(php artisan make:filament-page EditNotificationBoard) and its content is:

<?php

namespace App\Filament\Pages;

use Filament\Forms\ComponentContainer;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Filament\Pages\Page;
use Filament\Resources\Form;

/**
  • @property Form $form
    */
class EditNotificationBoard extends Page
{

use InteractsWithForms;

public ?array $data = [];

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

protected static string $view = 'filament.pages.edit-notification-board';

public function mount(): void
{


$this->form->fill();
}

public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('message')
->required(),
]);
}
}

the next is my blade.php file and its content is:

<x-filament::page>
<x-filament::form>
{{ $this->form }}
</x-filament::form>
</x-filament::page>

so, after all of that, i cant see my form on the page(looktat the screen)
Please, help me!!!


and my second question is:
could you show me how i can store data as json file on the disk(localy)?
Thanks in advance
image.png
Was this page helpful?