芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/invoicer.pulsehost.co.uk/app/Policies/EstimatePolicy.php
hasCompany($estimate->company_id)) { return true; } return false; } /** * Determine whether the user can create models. * * @return mixed */ public function create(User $user): bool { if (BouncerFacade::can('create-estimate', Estimate::class)) { return true; } return false; } /** * Determine whether the user can update the model. * * @return mixed */ public function update(User $user, Estimate $estimate): bool { if (BouncerFacade::can('edit-estimate', $estimate) && $user->hasCompany($estimate->company_id)) { return true; } return false; } /** * Determine whether the user can delete the model. * * @return mixed */ public function delete(User $user, Estimate $estimate): bool { if (BouncerFacade::can('delete-estimate', $estimate) && $user->hasCompany($estimate->company_id)) { return true; } return false; } /** * Determine whether the user can restore the model. * * @return mixed */ public function restore(User $user, Estimate $estimate): bool { if (BouncerFacade::can('delete-estimate', $estimate) && $user->hasCompany($estimate->company_id)) { return true; } return false; } /** * Determine whether the user can permanently delete the model. * * @return mixed */ public function forceDelete(User $user, Estimate $estimate): bool { if (BouncerFacade::can('delete-estimate', $estimate) && $user->hasCompany($estimate->company_id)) { return true; } return false; } /** * Determine whether the user can send email of the model. * * @param \App\Models\Estimate $payment * @return mixed */ public function send(User $user, Estimate $estimate) { if (BouncerFacade::can('send-estimate', $estimate) && $user->hasCompany($estimate->company_id)) { return true; } return false; } /** * Determine whether the user can delete models. * * @return mixed */ public function deleteMultiple(User $user) { if (BouncerFacade::can('delete-estimate', Estimate::class)) { return true; } return false; } }