How to Manage Post Status, Schedule, and Publish Date in Laravel Filament with WordPress-like Fun

I'm building a blog application using Laravel Filament and I need to implement a feature that allows users to manage post status, schedule, and publish date. Specifically, I want to include four status options for posts: "Pending Review", "Draft", "Publish", and "Schedule". When creating a new post, I want to show only "Pending Review" and "Draft" options in the status dropdown. After creating a post, if the post was created in the past, I want to show "Pending Review", "Draft", and "Publish" options in the status dropdown. If the post was created with a future date, I want to show "Pending Review", "Draft", and "Schedule" options in the status dropdown.
1 Reply
Dan Harrin
Dan Harrin15mo ago
you can pass a function to options() which returns options based on the model. check the "closure customization" section of the form builder docs