Tables\Columns\ToggleColumn::make('active')
->disabled(function (Project $record) {
return !$record->hasAllRequiredFields();
})
->afterStateUpdated(function(){
Cache::forget(CacheManager::makeCacheToken("active_projects"));
Notification::make()
->success()
->title(__("Project Status Updated"))
->send();
}),
Tables\Columns\ToggleColumn::make('active')
->disabled(function (Project $record) {
return !$record->hasAllRequiredFields();
})
->afterStateUpdated(function(){
Cache::forget(CacheManager::makeCacheToken("active_projects"));
Notification::make()
->success()
->title(__("Project Status Updated"))
->send();
}),