芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/yeahea.digitalhubbd.com/app/Policies/CustomerPolicy.php
<?php namespace App\Policies; use App\Models\Customer; use App\Helpers\Authorize; use App\Models\User; use Illuminate\Auth\Access\HandlesAuthorization; class CustomerPolicy { use HandlesAuthorization; /** * Determine whether the user can view customers. * * @param \App\Models\User $user * @return mixed */ public function index(User $user) { return (new Authorize($user, 'view_customer'))->check(); } /** * Determine whether the user can view the Customer. * * @param \App\Models\User $user * @param \App\Models\Customer $customer * @return mixed */ public function view(User $user, Customer $customer) { return (new Authorize($user, 'view_customer', $customer))->check(); } /** * Determine whether the user can create Customers. * * @param \App\Models\User $user * @return mixed */ public function create(User $user) { return (new Authorize($user, 'add_customer'))->check(); } /** * Determine whether the user can update the Customer. * * @param \App\Models\User $user * @param \App\Models\Customer $customer * @return mixed */ public function update(User $user, Customer $customer) { return (new Authorize($user, 'edit_customer', $customer))->check(); } /** * Determine whether the user can delete the Customer. * * @param \App\Models\User $user * @param \App\Models\Customer $customer * @return mixed */ public function delete(User $user, Customer $customer) { return (new Authorize($user, 'delete_customer', $customer))->check(); } /** * Determine whether the user can delete the Product. * * @param \App\Models\User $user * @return mixed */ public function massDelete(User $user) { return (new Authorize($user, 'delete_customer'))->check(); } }
Page is not found
Oops! Page not found.
Sorry, an error has occured, Requested page not found!
Back To Homepage