can($permission)) { return ' '; } } /** * @return string */ public function getDeleteButtonAttribute($permission, $route) { if (Auth::user()->can($permission)) { return ' '; } } }