Is there a way to conditionally disable the new post button?

Hi guys,

Thank you for all your help today! I was wondering if there's a way to conditionally disable the "New" button on a resource?

I only want the "New" button to be enabled once a user has completed a number of setup steps.

And on a similar vein, I want to add another button next to the "New site" button that says "Authorise Airtable" (this is the step they need to take before being able to add a new site)
image.png
Solution
Yes add ->visibile(fn($record) => auth()->user()->can('create Site'))
Was this page helpful?