for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Yaro\Jarboe\Table\Actions;
class DeleteAction extends AbstractAction
{
protected $ident = 'delete';
public function render($model = null)
$isVisible = parent::shouldRender($model);
if ($this->crud()->isSoftDeleteEnabled()) {
$isVisible = !$model->trashed();
}
return view('jarboe::crud.actions.delete', [
'crud' => $this->crud(),
'model' => $model,
'isVisible' => $isVisible,
'action' => $this,
]);
public function isAllowed($model = null)
$isAllowed = parent::isAllowed($model);
return $isAllowed && !$model->trashed();
return $isAllowed;
public function shouldRender($model = null)
return true;
return parent::shouldRender($model);