© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
vkDas

Default data not showing in page

I have a custom resource page in which I have sent an email through this resource and a page will open when I click on the button present inside the mail and I want to show the corresponding data and the data is present inside the mount function but the data is not showing in the UI . All the data is present inside the $appraisal_response. Please help me to fix this issue...Thank you and here is the code
class ResponseRequest extends EditRecord
{

    protected static string $resource = ResponseResource::class;

    protected static string $layout = 'components.response-request.layouts.app';
    public $employee_code_with_full_name;
    public $review_period_start_date;
    public $review_period_end_date;
    public $type;
    public $appraisal_session_id;


  
    public function mount(int | string $record = null): void
    {
        try {
            $data = JWT::decode(app('request')->input('token'), ['header' => true]);
        } catch (\Throwable $th) {
            abort(403);
        }
        $appraisal_response = Response::where([['id', $data['response_id']], ['status', ResponseStatus::DRAFT]])->first();
        // dd($appraisal_response);
        if (!$appraisal_response) {
            abort(404);
        }

        parent::mount($appraisal_response->id);
    }

    protected function getHeaderActions(): array
    {
        return [
            //
        ];
    }

    protected function afterSave(): void
    {
        $this->record->status = ResponseStatus::SUBMITTED();
        $this->record->save();
    }

    public function form(Form $form): Form
    {
        $form = static::$resource::form($form, true);
        return $form;
    }
}
class ResponseRequest extends EditRecord
{

    protected static string $resource = ResponseResource::class;

    protected static string $layout = 'components.response-request.layouts.app';
    public $employee_code_with_full_name;
    public $review_period_start_date;
    public $review_period_end_date;
    public $type;
    public $appraisal_session_id;


  
    public function mount(int | string $record = null): void
    {
        try {
            $data = JWT::decode(app('request')->input('token'), ['header' => true]);
        } catch (\Throwable $th) {
            abort(403);
        }
        $appraisal_response = Response::where([['id', $data['response_id']], ['status', ResponseStatus::DRAFT]])->first();
        // dd($appraisal_response);
        if (!$appraisal_response) {
            abort(404);
        }

        parent::mount($appraisal_response->id);
    }

    protected function getHeaderActions(): array
    {
        return [
            //
        ];
    }

    protected function afterSave(): void
    {
        $this->record->status = ResponseStatus::SUBMITTED();
        $this->record->save();
    }

    public function form(Form $form): Form
    {
        $form = static::$resource::form($form, true);
        return $form;
    }
}
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Showing the last page as default
FilamentFFilament / ❓┊help
16mo ago
Admin Page not showing
FilamentFFilament / ❓┊help
3y ago
Saved data not showing in multiselect field
FilamentFFilament / ❓┊help
16mo ago
default value in custom page
FilamentFFilament / ❓┊help
3y ago