main

filamentphp/demo

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

CreateProduct.php

TLDR

This file defines a class called CreateProduct which extends the CreateRecord class. It is used in the Filament package for creating a new record for the ProductResource resource.

Classes

CreateProduct

The CreateProduct class extends the CreateRecord class, which is provided by the Filament package. It is used for creating a new record for the ProductResource resource. The $resource property is set to ProductResource::class which specifies the resource class to be used for creating the product.

<?php

namespace App\Filament\Resources\Shop\ProductResource\Pages;

use App\Filament\Resources\Shop\ProductResource;
use Filament\Resources\Pages\CreateRecord;

class CreateProduct extends CreateRecord
{
    protected static string $resource = ProductResource::class;
}