Filament Tips: Stop user from creating new items.

Filament Tips: Stop user from creating new items.

I need to stop users from creating new items, and it is pretty easy. Here are the code snippets:
Add this static function to your resource file, and that is all. You are done.

    // Can not create any order
    public static function canCreate(): bool
    {
        return false;
    }

Here is a Tweet from Povilas talking about this scenario in detail.

https://twitter.com/PovilasKorop/status/1692449008629727243