芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/app/Policies/RecurringInvoicePolicy.php
hasCompany($recurringInvoice->company_id)) { return true; } return false; } /** * Determine whether the user can create models. * * @return \Illuminate\Auth\Access\Response|bool */ public function create(User $user): bool { if (BouncerFacade::can('create-recurring-invoice', RecurringInvoice::class)) { return true; } return false; } /** * Determine whether the user can update the model. * * @return \Illuminate\Auth\Access\Response|bool */ public function update(User $user, RecurringInvoice $recurringInvoice): bool { if (BouncerFacade::can('edit-recurring-invoice', $recurringInvoice) && $user->hasCompany($recurringInvoice->company_id)) { return true; } return false; } /** * Determine whether the user can delete the model. * * @return \Illuminate\Auth\Access\Response|bool */ public function delete(User $user, RecurringInvoice $recurringInvoice): bool { if (BouncerFacade::can('delete-recurring-invoice', $recurringInvoice) && $user->hasCompany($recurringInvoice->company_id)) { return true; } return false; } /** * Determine whether the user can restore the model. * * @return \Illuminate\Auth\Access\Response|bool */ public function restore(User $user, RecurringInvoice $recurringInvoice): bool { if (BouncerFacade::can('delete-recurring-invoice', $recurringInvoice) && $user->hasCompany($recurringInvoice->company_id)) { return true; } return false; } /** * Determine whether the user can permanently delete the model. * * @return \Illuminate\Auth\Access\Response|bool */ public function forceDelete(User $user, RecurringInvoice $recurringInvoice): bool { if (BouncerFacade::can('delete-recurring-invoice', $recurringInvoice) && $user->hasCompany($recurringInvoice->company_id)) { return true; } return false; } /** * Determine whether the user can delete models. * * @return mixed */ public function deleteMultiple(User $user) { if (BouncerFacade::can('delete-recurring-invoice', RecurringInvoice::class)) { return true; } return false; } }