1 个月前
10 热度
Resources
IntroductionResources are static classes that are used to build CRUD interfaces for your Eloquent models. They describe how administrators should be able to interact with data from your app using tables and forms.
Creating a resourceTo create a resource for the App\Models\Customer model:
php artisan make:filament-resource Customer
This will create several files in the app/Filament/Resources directory:
.
+-- Customers
| +-- CustomerResource.php
| +-- Pages
| | +-- CreateCustomer.php
| | +-- EditCustomer.php
| | +-- ListCustomers.php
| +-- Schemas
| | +-- CustomerForm.php
| +-- Tables
| | +-- CustomersTable.php
Your new resource class lives in CustomerResource.php.