From 6425a65037583fb9cb5d4f8562fe7495fc90e75f Mon Sep 17 00:00:00 2001 From: Lukas Frey Date: Mon, 10 Oct 2022 15:30:46 +0200 Subject: [PATCH] Updated readme --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 04ec0b0..d960b6e 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ Currently, the following components are available: 2. [Timestamps](#timestamps) 3. [UpdatedAt](#updatedat) 4. [CreatedAt](#createdat) +5. [DeletedAt](#deletedat) +6. [Timestamp](#timestamp) ### Sidebar @@ -107,6 +109,33 @@ return $form->schema([ ]); ``` +## DeletedAt + +Use the `DeletedAt` component to display the `deleted_at` timestamp for your soft-delete record: + +```php +use RalphJSmit\Filament\Components\Forms\DeletedAt; + +return $form->schema([ + DeletedAt::make(), + // +]); +``` + +## Timestamp + +Use the `Timestamp` component to display a custom timestamp for your record. Internally, all of the above timestamps +use this component. + +```php +use RalphJSmit\Filament\Components\Forms\Timestamp; + +return $form->schema([ + Timestamp::make('email_verified_at'), + // +]); +``` + ## General 🐞 If you spot a bug, please submit a detailed issue and I'll try to fix it as soon as possible.