mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-10-17 08:10:46 +02:00
38 lines
816 B
PHP
38 lines
816 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Filament\BulkActions\Base;
|
|
|
|
use App\Concerns\Filament\Actions\HasActionLogs;
|
|
use Filament\Tables\Actions\DetachBulkAction as DefaultDetachBulkAction;
|
|
|
|
/**
|
|
* Class DetachBulkAction.
|
|
*/
|
|
class DetachBulkAction extends DefaultDetachBulkAction
|
|
{
|
|
use HasActionLogs;
|
|
|
|
/**
|
|
* Initial setup for the action.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$this->label(__('filament.bulk_actions.base.detach'));
|
|
|
|
$this->authorize('forcedeleteany');
|
|
|
|
$this->after(function (DetachBulkAction $action) {
|
|
foreach ($this->getRecords() as $record) {
|
|
$this->createActionLog($action, $record);
|
|
$this->finishedLog();
|
|
}
|
|
});
|
|
}
|
|
}
|