main

filamentphp/demo

Last updated at: 29/12/2023 09:48

CreatePost.php

TLDR

This file defines a class called CreatePost that extends the CreateRecord class. It is used in the context of the PostResource resource in the Filament package for creating a new post.

Classes

CreatePost

The CreatePost class extends the CreateRecord class. It is used to define the behavior and settings for the "Create Post" page in the PostResource resource. This class is specifically designed for use with the Filament package and is located in the App\Filament\Resources\Blog\PostResource\Pages namespace.

<?php

namespace App\Filament\Resources\Blog\PostResource\Pages;

use App\Filament\Resources\Blog\PostResource;
use Filament\Resources\Pages\CreateRecord;

class CreatePost extends CreateRecord
{
    protected static string $resource = PostResource::class;
}