How to remove create & create another button?

No description
9 Replies
lazydog
lazydog9mo ago
Am not sure you can remove that but you can create a custom view or you can create a custom page and custom livewire component.
Dennis Koch
Dennis Koch9mo ago
There's an property $canCreateAnother or similar which you can set to false. This was answered multiple times already, try using the search before posting.
wandiaprianto
wandiaprianto9mo ago
okay, thankyou where to put this code?
Dennis Koch
Dennis Koch9mo ago
Should be on the CreatePage
wandiaprianto
wandiaprianto9mo ago
<?php namespace App\Filament\Resources\Car\KindResource\Pages; use App\Filament\Resources\Car\KindResource; use Filament\Resources\Pages\ManageRecords; class ManageKinds extends ManageRecords { protected static string $resource = KindResource::class; protected function getActions(): array { return [ \Filament\Actions\CreateAction::make() ->canCreateAnother(false), ]; } }
i got error
class KindResource extends Resource { protected static ?string $model = Kind::class; protected static ?string $slug = 'car/kinds'; protected static ?string $recordTitleAttribute = 'name'; protected static ?bool $canCreateAnother = false; protected static ?string $navigationGroup = 'Car'; protected static ?string $navigationIcon = 'heroicon-o-circle-stack'; .... }
this too got error
Dennis Koch
Dennis Koch9mo ago
How the hell should we help if you don't tell us the error?
wandiaprianto
wandiaprianto9mo ago
sorry. solved now
<?php namespace App\Filament\Resources\Car\KindResource\Pages; use App\Filament\Resources\Car\KindResource; use Filament\Resources\Pages\ManageRecords; class ManageKinds extends ManageRecords { protected static string $resource = KindResource::class; protected function getActions(): array { return [ \Filament\Actions\CreateAction::make()->createAnother(false), ]; } }
Dennis Koch
Dennis Koch9mo ago
We could help you better if you'd provide more information than a screenshot. This didn't look like a modal at all.
wandiaprianto
wandiaprianto9mo ago
i will improve that. sorry can you help me in another question https://discord.com/channels/883083792112300104/1167003082429829130 thankyou @Dennis Koch