canDo('legal.legal.approve')) { return true; } return false; } /** * Determine if the given user can approve the given legal. * * @param Authenticatable $user * * @return bool */ public function submit(Authenticatable $user, Legal $legal) { if ($user->canDo('legal.legal.submit')) { return true; } return false; } /** * Determine if the given user can approve the given legal. * * @param Authenticatable $user * * @return bool */ public function publish(Authenticatable $user, Legal $legal) { if ($user->canDo('legal.legal.publish')) { return true; } return false; } /** * Determine if the given user can approve the given legal. * * @param Authenticatable $user * * @return bool */ public function unpublish(Authenticatable $user, Legal $legal) { if ($user->canDo('legal.legal.unpublish')) { return true; } return false; } /** * Determine if the given user can approve the given legal. * * @param Authenticatable $user * * @return bool */ public function archive(Authenticatable $user, Legal $legal) { if ($user->canDo('legal.legal.archive')) { return true; } return false; } /** * Determine if the given user can approve the given legal. * * @param Authenticatable $user * * @return bool */ public function unarchive(Authenticatable $user, Legal $legal) { if ($user->canDo('legal.legal.unarchive')) { return true; } return false; } /** * Determine if the given user can approve the given legal. * * @param Authenticatable $user * * @return bool */ public function reject(Authenticatable $user, Legal $legal) { if ($user->canDo('legal.legal.reject')) { return true; } return false; } }