CINXE.COM

GitHub - JosephSilber/bouncer: Laravel Eloquent roles and abilities.

<!DOCTYPE html> <html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system" data-a11y-link-underlines="true" > <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com"> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-3e154969b9f9.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-9c5b7a476542.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-afda8eb0fb33.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-2494e44ccdc5.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-56fff47acadc.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-71cd4cc132ec.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-fd5499848985.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-31d17ba3e139.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-68d6b2c79663.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-primitives-4cf0d59ab51a.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-af846850481e.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-e41ff91f8baa.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-d3b66f11d613.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/repository-1e3bbbee6b91.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-a0610fd00b47.css" /> <script type="application/json" id="client-env">{"locale":"en","featureFlags":["copilot_new_references_ui","copilot_beta_features_opt_in","copilot_chat_static_thread_suggestions","copilot_conversational_ux_history_refs","copilot_implicit_context","copilot_smell_icebreaker_ux","experimentation_azure_variant_endpoint","failbot_handle_non_errors","geojson_azure_maps","ghost_pilot_confidence_truncation_25","ghost_pilot_confidence_truncation_40","hovercard_accessibility","issues_react_new_timeline","issues_react_avatar_refactor","issues_react_remove_placeholders","issues_react_cache_fix_workaround","issues_react_blur_item_picker_on_close","marketing_pages_search_explore_provider","remove_child_patch","sample_network_conn_type","site_metered_billing_update","issues_react_first_time_contribution_banner","jk_navigation_in_list_view","ui_commands_respect_modals","lifecycle_label_name_updates"]}</script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-118ecaabd77e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_dompurify_dist_purify_js-b73fdff77a4e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover_js-aff936e590ed.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_arianotify-polyfill_ariaNotify-polyfill_js-node_modules_github_mi-247092-740e4ddd559d.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_failbot_failbot_ts-a46544e9ee5e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-cd35650c2e9c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_index_mjs-4aa4b0e95669.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-f690fd9ae3d5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-6d3967acd51c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_combobox-nav_dist_index_js-node_modules_github_g-emoji-element_di-6ce195-53781cbc550f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-3cdfa69a0406.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_text-expander-element_dist_index_js-f5498b8d4e5d.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-b5f1d7-492b5042c841.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-1f651a-1e3d784c897c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_primer_view-co-7671f1-dc6cac136d88.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-71486356f507.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-e3ab8405ef80.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_braintree_browser-detection_dist_browser-detection_js-node_modules_githu-bb80ec-634de60bacfa.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-ce7225a304c5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_hydro-analytics-client_dist_analytics-client_js-node_modules_gith-f3aee1-e6893db9c19e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_morphdom_dist_morphdom-e-7c534c-f8a5485c982a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_turbo_dist_turbo_es2017-esm_js-858e043fcf76.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-893f9f-6cf3320416b8.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_scroll-anchoring_dist_scroll-anchoring_esm_js-node_modules_stacktrace-pa-a71630-6f3c4f0189d8.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-0e07cc183eed.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_quote-selection_dist_index_js-node_modules_github_session-resume_-0b5e12-889cec8cf448.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_updatable-content_updatable-content_ts-eae9df0dd562.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_task-list_ts-app_assets_modules_github_sso_ts-ui_packages-900dde-18d1c91a7872.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-7cbef09a422c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_ajax-error_ts-app_assets_modules_github_behaviors_include-d0d0a6-0e9fa537dc4f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-c89801ebbe15.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-93287f4de493.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-f6223d90c7ba.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-3366f6b6298e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_template-parts_lib_index_js-96453a51f920.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-b0a862-4d8589138d1e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-0e9dbe-d2bcedf65682.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-043af64042a1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-4158520ad4d7.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_decorators_js-node_modules_delegated-events_di-cc9bcb-ea42a360c5ae.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_filter--35675b-aff280068839.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-ce9ff2a57e1f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_catalyst_lib_inde-dbbea9-9b97703a4e6a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-3118a76a2829.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/primer-react-765944243383.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-core-cd0a67881543.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-lib-7b7b5264f6c1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/octicons-react-45c3a19dd792.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_emotion_is-prop-valid_dist_emotion-is-prop-valid_esm_js-node_modules_emo-62da9f-54c0c921f04b.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-e7dcdd-285fc29e9fa5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover-fn_js-4896ddd4b7bb.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-subscriptions-menu-1490f5bef85d.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.9fa170e9435ed4b922b9.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/notifications-subscriptions-menu.1bcff9205c241e99cff2.module.css" /> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/primer-react-765944243383.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-core-cd0a67881543.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-lib-7b7b5264f6c1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/octicons-react-45c3a19dd792.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_emotion_is-prop-valid_dist_emotion-is-prop-valid_esm_js-node_modules_emo-62da9f-54c0c921f04b.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-e7dcdd-285fc29e9fa5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover-fn_js-4896ddd4b7bb.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-subscriptions-menu-1490f5bef85d.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.9fa170e9435ed4b922b9.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/notifications-subscriptions-menu.1bcff9205c241e99cff2.module.css" /> <title>GitHub - JosephSilber/bouncer: Laravel Eloquent roles and abilities.</title> <meta name="route-pattern" content="/:user_id/:repository" data-turbo-transient> <meta name="route-controller" content="files" data-turbo-transient> <meta name="route-action" content="disambiguate" data-turbo-transient> <meta name="current-catalog-service-hash" content="f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb"> <meta name="request-id" content="E86C:D6229:B2FCF:C7EB2:6742EB3D" data-pjax-transient="true"/><meta name="html-safe-nonce" content="3ab4c7dda27e7c25d0039d5e95cc53337ff64827d336a38247d083af77fe6b38" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODZDOkQ2MjI5OkIyRkNGOkM3RUIyOjY3NDJFQjNEIiwidmlzaXRvcl9pZCI6Ijg3MjcxMjg4NDE0NDI3NDkyNDUiLCJyZWdpb25fZWRnZSI6InNvdXRoZWFzdGFzaWEiLCJyZWdpb25fcmVuZGVyIjoic291dGhlYXN0YXNpYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="2d9478d34f0620e1da1db70a52365c6035d33e9ae8895f3c67b2769c5b478f3f" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:42622303" data-turbo-transient> <meta name="github-keyboard-shortcuts" content="repository,copilot" data-turbo-transient="true" /> <meta name="selected-link" value="repo_source" data-turbo-transient> <link rel="assets" href="https://github.githubassets.com/"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I"> <meta name="octolytics-url" content="https://collector.github.com/github/collect" /> <meta name="analytics-location" content="/&lt;user-name&gt;/&lt;repo-name&gt;" data-turbo-transient="true" /> <meta name="user-login" content=""> <meta name="viewport" content="width=device-width"> <meta name="description" content="Laravel Eloquent roles and abilities. Contribute to JosephSilber/bouncer development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905, app-argument=https://github.com/JosephSilber/bouncer" /> <meta name="twitter:image" content="https://opengraph.githubassets.com/fbc6d69a881699e4d6b5633ce06a97820473bae7f2c551e51b13a153c016b56f/JosephSilber/bouncer" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="GitHub - JosephSilber/bouncer: Laravel Eloquent roles and abilities." /><meta name="twitter:description" content="Laravel Eloquent roles and abilities. Contribute to JosephSilber/bouncer development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/fbc6d69a881699e4d6b5633ce06a97820473bae7f2c551e51b13a153c016b56f/JosephSilber/bouncer" /><meta property="og:image:alt" content="Laravel Eloquent roles and abilities. Contribute to JosephSilber/bouncer development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="GitHub - JosephSilber/bouncer: Laravel Eloquent roles and abilities." /><meta property="og:url" content="https://github.com/JosephSilber/bouncer" /><meta property="og:description" content="Laravel Eloquent roles and abilities. Contribute to JosephSilber/bouncer development by creating an account on GitHub." /> <meta name="hostname" content="github.com"> <meta name="expected-hostname" content="github.com"> <meta http-equiv="x-pjax-version" content="272935131c2027f789efabd5bf30904ffaea35908a22afd03d8f75128cee7e1b" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="ace39c3b6632770952207593607e6e0be0db363435a8b877b1f96abe6430f345" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="8968ee26e93ec8c6d3c4e91c77fb9d206091689d451ebbcddeca3832587a5b30" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="c4972ae1cf5d4607c47252349fc1b47a24ff0ea303e5a8fbbe18ec27725a87ee" data-turbo-track="reload"> <meta name="turbo-cache-control" content="no-preview" data-turbo-transient=""> <meta data-hydrostats="publish"> <meta name="go-import" content="github.com/JosephSilber/bouncer git https://github.com/JosephSilber/bouncer.git"> <meta name="octolytics-dimension-user_id" content="1403741" /><meta name="octolytics-dimension-user_login" content="JosephSilber" /><meta name="octolytics-dimension-repository_id" content="42622303" /><meta name="octolytics-dimension-repository_nwo" content="JosephSilber/bouncer" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="42622303" /><meta name="octolytics-dimension-repository_network_root_nwo" content="JosephSilber/bouncer" /> <link rel="canonical" href="https://github.com/JosephSilber/bouncer" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive"> <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats"> <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors"> <link rel="mask-icon" href="https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg" data-base-href="https://github.githubassets.com/favicons/favicon"> <meta name="theme-color" content="#1e2327"> <meta name="color-scheme" content="light dark" /> <link rel="manifest" href="/manifest.json" crossOrigin="use-credentials"> </head> <body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div class="position-relative header-wrapper js-header-wrapper "> <a href="#start-of-content" data-skip-target-assigned="false" class="px-2 py-4 color-bg-accent-emphasis color-fg-on-emphasis show-on-focus js-skip-to-content">Skip to content</a> <span data-view-component="true" class="progress-pjax-loader Progress position-fixed width-full"> <span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis"></span> </span> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_ui-commands_ui-commands_ts-d25fac54a6bc.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/keyboard-shortcuts-dialog-ed30662f9578.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.9fa170e9435ed4b922b9.module.css" /> <react-partial partial-name="keyboard-shortcuts-dialog" data-ssr="false" data-attempted-ssr="false" > <script type="application/json" data-target="react-partial.embeddedData">{"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}</script> <div data-target="react-partial.reactRoot"></div> </react-partial> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-cf3dd69d89eb.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-8fa3b694f335.js"></script> <header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark> <h2 class="sr-only">Navigation Menu</h2> <button type="button" class="HeaderMktg-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span class="d-none">Toggle navigation</span> </button> <div class="d-flex flex-column flex-lg-row flex-items-center px-3 px-md-4 px-lg-5 height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <div class="flex-1"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target js-nav-padding-recalculate js-header-menu-toggle Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span class="Button-content"> <span class="Button-label"><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span> </button> </div> <a class="mr-lg-3 color-fg-inherit flex-order-2 js-prevent-focus-on-mobile-nav" href="/" aria-label="Homepage" data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to go to homepage&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Logomark;ref_loc:Header&quot;}"> <svg height="32" aria-hidden="true" viewBox="0 0 24 24" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"></path> </svg> </a> <div class="flex-1 flex-order-2 text-right"> <a href="/login?return_to=https%3A%2F%2Fgithub.com%2FJosephSilber%2Fbouncer" class="HeaderMenu-link HeaderMenu-button d-inline-flex d-lg-none flex-order-1 f5 no-underline border color-border-default rounded-2 px-2 py-1 color-fg-inherit js-prevent-focus-on-mobile-nav" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/JosephSilber/bouncer&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="3542db330f4ead6f6f614f8d124d286798408c65fe7a4e1ff9e491884b710f94" data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to Sign in&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Sign in;ref_loc:Header&quot;}" > Sign in </a> </div> </div> <div class="HeaderMenu js-header-menu height-fit position-lg-relative d-lg-flex flex-column flex-auto top-0"> <div class="HeaderMenu-wrapper d-flex flex-column flex-self-start flex-lg-row flex-auto rounded rounded-lg-0"> <nav class="HeaderMenu-nav" aria-label="Global"> <ul class="d-lg-flex list-style-none"> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_copilot&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_copilot_link_product_navbar&quot;}" href="https://github.com/features/copilot"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M23.922 16.992c-.861 1.495-5.859 5.023-11.922 5.023-6.063 0-11.061-3.528-11.922-5.023A.641.641 0 0 1 0 16.736v-2.869a.841.841 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952 1.399-1.136 3.392-2.093 6.122-2.093 2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.832.832 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256ZM12.172 11h-.344a4.323 4.323 0 0 1-.355.508C10.703 12.455 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a2.005 2.005 0 0 1-.085-.104L4 11.741v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.016.016Zm.641-2.935c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"></path><path d="M14.5 14.25a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Zm-5 0a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Z"></path> </svg> <div> <div class="color-fg-default h4">GitHub Copilot</div> Write better code with AI </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;security&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;security_link_product_navbar&quot;}" href="https://github.com/features/security"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path> </svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;actions&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;actions_link_product_navbar&quot;}" href="https://github.com/features/actions"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path> </svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;codespaces&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;codespaces_link_product_navbar&quot;}" href="https://github.com/features/codespaces"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path> </svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;issues&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;issues_link_product_navbar&quot;}" href="https://github.com/features/issues"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path> </svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;code_review&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;code_review_link_product_navbar&quot;}" href="https://github.com/features/code-review"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path> </svg> <div> <div class="color-fg-default h4">Code Review</div> Manage code changes </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;discussions&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;discussions_link_product_navbar&quot;}" href="https://github.com/features/discussions"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path> </svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;code_search&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;code_search_link_product_navbar&quot;}" href="https://github.com/features/code-search"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-square color-fg-subtle mr-3"> <path d="M10.3 8.24a.75.75 0 0 1-.04 1.06L7.352 12l2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M2 3.75C2 2.784 2.784 2 3.75 2h16.5c.966 0 1.75.784 1.75 1.75v16.5A1.75 1.75 0 0 1 20.25 22H3.75A1.75 1.75 0 0 1 2 20.25Zm1.75-.25a.25.25 0 0 0-.25.25v16.5c0 .138.112.25.25.25h16.5a.25.25 0 0 0 .25-.25V3.75a.25.25 0 0 0-.25-.25Z"></path> </svg> <div> <div class="color-fg-default h4">Code Search</div> Find more, search less </div> </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="product-explore-heading">Explore</span> <ul class="list-style-none f5" aria-labelledby="product-explore-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;all_features&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;all_features_link_product_navbar&quot;}" href="https://github.com/features"> All features </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;documentation&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;documentation_link_product_navbar&quot;}" href="https://docs.github.com"> Documentation <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_skills&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_skills_link_product_navbar&quot;}" href="https://skills.github.com"> GitHub Skills <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;blog&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;blog_link_product_navbar&quot;}" href="https://github.blog"> Blog <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 pb-lg-3 mb-3 mb-lg-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-company-size-heading">By company size</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-company-size-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;enterprises&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;enterprises_link_solutions_navbar&quot;}" href="https://github.com/enterprise"> Enterprises </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;small_and_medium_teams&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;small_and_medium_teams_link_solutions_navbar&quot;}" href="https://github.com/team"> Small and medium teams </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;startups&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;startups_link_solutions_navbar&quot;}" href="https://github.com/enterprise/startups"> Startups </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-use-case-heading">By use case</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-use-case-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;devsecops&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;devsecops_link_solutions_navbar&quot;}" href="/solutions/use-case/devsecops"> DevSecOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;devops&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;devops_link_solutions_navbar&quot;}" href="/solutions/use-case/devops"> DevOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;ci_cd&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;ci_cd_link_solutions_navbar&quot;}" href="/solutions/use-case/ci-cd"> CI/CD </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;view_all_use_cases&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;view_all_use_cases_link_solutions_navbar&quot;}" href="/solutions/use-case"> View all use cases </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-industry-heading">By industry</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-industry-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;healthcare&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;healthcare_link_solutions_navbar&quot;}" href="/solutions/industry/healthcare"> Healthcare </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;financial_services&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;financial_services_link_solutions_navbar&quot;}" href="/solutions/industry/financial-services"> Financial services </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;manufacturing&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;manufacturing_link_solutions_navbar&quot;}" href="/solutions/industry/manufacturing"> Manufacturing </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;government&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;government_link_solutions_navbar&quot;}" href="/solutions/industry/government"> Government </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;view_all_industries&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;view_all_industries_link_solutions_navbar&quot;}" href="/solutions/industry"> View all industries </a></li> </ul> </div> </div> <div class="HeaderMenu-trailing-link rounded-bottom-2 flex-shrink-0 mt-lg-4 px-lg-4 py-4 py-lg-3 f5 text-semibold"> <a href="/solutions"> View all solutions <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-right HeaderMenu-trailing-link-icon"> <path d="M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"></path> </svg> </a> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Resources <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="resources-topics-heading">Topics</span> <ul class="list-style-none f5" aria-labelledby="resources-topics-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;ai&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;ai_link_resources_navbar&quot;}" href="/resources/articles/ai"> AI </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;devops&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;devops_link_resources_navbar&quot;}" href="/resources/articles/devops"> DevOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;security&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;security_link_resources_navbar&quot;}" href="/resources/articles/security"> Security </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;software_development&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;software_development_link_resources_navbar&quot;}" href="/resources/articles/software-development"> Software Development </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;view_all&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;view_all_link_resources_navbar&quot;}" href="/resources/articles"> View all </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="resources-explore-heading">Explore</span> <ul class="list-style-none f5" aria-labelledby="resources-explore-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;learning_pathways&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;learning_pathways_link_resources_navbar&quot;}" href="https://resources.github.com/learn/pathways"> Learning Pathways <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;white_papers_ebooks_webinars&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;white_papers_ebooks_webinars_link_resources_navbar&quot;}" href="https://resources.github.com"> White papers, Ebooks, Webinars <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;customer_stories&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;customer_stories_link_resources_navbar&quot;}" href="https://github.com/customer-stories"> Customer Stories </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;partners&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;partners_link_resources_navbar&quot;}" href="https://partner.github.com"> Partners <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 px-lg-4"> <div class="HeaderMenu-column"> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_sponsors&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_sponsors_link_open_source_navbar&quot;}" href="/sponsors"> <div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;the_readme_project&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;the_readme_project_link_open_source_navbar&quot;}" href="https://github.com/readme"> <div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="open-source-repositories-heading">Repositories</span> <ul class="list-style-none f5" aria-labelledby="open-source-repositories-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;topics&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;topics_link_open_source_navbar&quot;}" href="https://github.com/topics"> Topics </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;trending&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;trending_link_open_source_navbar&quot;}" href="https://github.com/trending"> Trending </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;collections&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;collections_link_open_source_navbar&quot;}" href="https://github.com/collections"> Collections </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Enterprise <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 px-lg-4"> <div class="HeaderMenu-column"> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;enterprise_platform&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;enterprise_platform_link_enterprise_navbar&quot;}" href="/enterprise"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-stack color-fg-subtle mr-3"> <path d="M11.063 1.456a1.749 1.749 0 0 1 1.874 0l8.383 5.316a1.751 1.751 0 0 1 0 2.956l-8.383 5.316a1.749 1.749 0 0 1-1.874 0L2.68 9.728a1.751 1.751 0 0 1 0-2.956Zm1.071 1.267a.25.25 0 0 0-.268 0L3.483 8.039a.25.25 0 0 0 0 .422l8.383 5.316a.25.25 0 0 0 .268 0l8.383-5.316a.25.25 0 0 0 0-.422Z"></path><path d="M1.867 12.324a.75.75 0 0 1 1.035-.232l8.964 5.685a.25.25 0 0 0 .268 0l8.964-5.685a.75.75 0 0 1 .804 1.267l-8.965 5.685a1.749 1.749 0 0 1-1.874 0l-8.965-5.685a.75.75 0 0 1-.231-1.035Z"></path><path d="M1.867 16.324a.75.75 0 0 1 1.035-.232l8.964 5.685a.25.25 0 0 0 .268 0l8.964-5.685a.75.75 0 0 1 .804 1.267l-8.965 5.685a1.749 1.749 0 0 1-1.874 0l-8.965-5.685a.75.75 0 0 1-.231-1.035Z"></path> </svg> <div> <div class="color-fg-default h4">Enterprise platform</div> AI-powered developer platform </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="enterprise-available-add-ons-heading">Available add-ons</span> <ul class="list-style-none f5" aria-labelledby="enterprise-available-add-ons-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;advanced_security&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;advanced_security_link_enterprise_navbar&quot;}" href="https://github.com/enterprise/advanced-security"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path> </svg> <div> <div class="color-fg-default h4">Advanced Security</div> Enterprise-grade security features </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_copilot&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_copilot_link_enterprise_navbar&quot;}" href="/features/copilot#enterprise"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M23.922 16.992c-.861 1.495-5.859 5.023-11.922 5.023-6.063 0-11.061-3.528-11.922-5.023A.641.641 0 0 1 0 16.736v-2.869a.841.841 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952 1.399-1.136 3.392-2.093 6.122-2.093 2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.832.832 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256ZM12.172 11h-.344a4.323 4.323 0 0 1-.355.508C10.703 12.455 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a2.005 2.005 0 0 1-.085-.104L4 11.741v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.016.016Zm.641-2.935c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"></path><path d="M14.5 14.25a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Zm-5 0a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Z"></path> </svg> <div> <div class="color-fg-default h4">GitHub Copilot</div> Enterprise-grade AI features </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;premium_support&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;premium_support_link_enterprise_navbar&quot;}" href="/premium-support"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path> </svg> <div> <div class="color-fg-default h4">Premium Support</div> Enterprise-grade 24/7 support </div> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <a class="HeaderMenu-link no-underline px-0 px-lg-2 py-3 py-lg-2 d-block d-lg-inline-block" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;pricing&quot;,&quot;context&quot;:&quot;global&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;pricing_link_global_navbar&quot;}" href="https://github.com/pricing">Pricing</a> </li> </ul> </nav> <div class="d-flex flex-column flex-lg-row width-full flex-justify-end flex-lg-items-center text-center mt-3 mt-lg-0 text-lg-left ml-lg-3"> <qbsearch-input class="search-input" data-scope="repo:JosephSilber/bouncer" data-custom-scopes-path="/search/custom_scopes" data-delete-custom-scopes-csrf="PnC3UadSQ1INhY_yrug3Be0LdQk8F0JRjqRv7aWM29tvTKour62FN5qjpI967XKhpuFefwu7SjyY4pz0K4wk2g" data-max-custom-scopes="10" data-header-redesign-enabled="false" data-initial-value="" data-blackbird-suggestions-path="/search/suggestions" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" data-current-repository="JosephSilber/bouncer" data-current-org="" data-current-owner="JosephSilber" data-logged-in="false" data-copilot-chat-enabled="false" data-nl-search-enabled="false" data-retain-scroll-position="true"> <div class="search-input-container search-with-dialog position-relative d-flex flex-row flex-items-center mr-4 rounded" data-action="click:qbsearch-input#searchInputContainerClicked" > <button type="button" class="header-search-button placeholder input-button form-control d-flex flex-1 flex-self-stretch flex-items-center no-wrap width-full py-0 pl-2 pr-0 text-left border-0 box-shadow-none" data-target="qbsearch-input.inputButton" aria-label="Search or jump to…" aria-haspopup="dialog" placeholder="Search or jump to..." data-hotkey=s,/ autocapitalize="off" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;searchbar&quot;,&quot;context&quot;:&quot;global&quot;,&quot;tag&quot;:&quot;input&quot;,&quot;label&quot;:&quot;searchbar_input_global_navbar&quot;}" data-action="click:qbsearch-input#handleExpand" > <div class="mr-2 color-fg-muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </div> <span class="flex-1" data-target="qbsearch-input.inputButtonText">Search or jump to...</span> <div class="d-flex" data-target="qbsearch-input.hotkeyIndicator"> <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg> </div> </button> <input type="hidden" name="type" class="js-site-search-type-field"> <div class="Overlay--hidden " data-modal-dialog-overlay> <modal-dialog data-action="close:qbsearch-input#handleClose cancel:qbsearch-input#handleClose" data-target="qbsearch-input.searchSuggestionsDialog" role="dialog" id="search-suggestions-dialog" aria-modal="true" aria-labelledby="search-suggestions-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto"> <h1 id="search-suggestions-dialog-header" class="sr-only">Search code, repositories, users, issues, pull requests...</h1> <div class="Overlay-body Overlay-body--paddingNone"> <div data-view-component="true"> <div class="search-suggestions position-fixed width-full color-shadow-large border color-fg-default color-bg-default overflow-hidden d-flex flex-column query-builder-container" style="border-radius: 12px;" data-target="qbsearch-input.queryBuilderContainer" hidden > <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="query-builder-test-form" action="" accept-charset="UTF-8" method="get"> <query-builder data-target="qbsearch-input.queryBuilder" id="query-builder-query-builder-test" data-filter-key=":" data-view-component="true" class="QueryBuilder search-query-builder"> <div class="FormControl FormControl--fullWidth"> <label id="query-builder-test-label" for="query-builder-test" class="FormControl-label sr-only"> Search </label> <div class="QueryBuilder-StyledInput width-fit " data-target="query-builder.styledInput" > <span id="query-builder-test-leadingvisual-wrap" class="FormControl-input-leadingVisualWrap QueryBuilder-leadingVisualWrap"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search FormControl-input-leadingVisual"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </span> <div data-target="query-builder.styledInputContainer" class="QueryBuilder-StyledInputContainer"> <div aria-hidden="true" class="QueryBuilder-StyledInputContent" data-target="query-builder.styledInputContent" ></div> <div class="QueryBuilder-InputWrapper"> <div aria-hidden="true" class="QueryBuilder-Sizer" data-target="query-builder.sizer"></div> <input id="query-builder-test" name="query-builder-test" value="" autocomplete="off" type="text" role="combobox" spellcheck="false" aria-expanded="false" aria-describedby="validation-42a7a582-4b89-4319-a065-2172a9a4c356" data-target="query-builder.input" data-action=" input:query-builder#inputChange blur:query-builder#inputBlur keydown:query-builder#inputKeydown focus:query-builder#inputFocus " data-view-component="true" class="FormControl-input QueryBuilder-Input FormControl-medium" /> </div> </div> <span class="sr-only" id="query-builder-test-clear">Clear</span> <button role="button" id="query-builder-test-clear-button" aria-labelledby="query-builder-test-clear query-builder-test-label" data-target="query-builder.clearButton" data-action=" click:query-builder#clear focus:query-builder#clearButtonFocus blur:query-builder#clearButtonBlur " variant="small" hidden="hidden" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium mr-1 px-2 py-0 d-flex flex-items-center rounded-1 color-fg-muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x-circle-fill Button-visual"> <path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path> </svg> </button> </div> <template id="search-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </template> <template id="code-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </template> <template id="file-code-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-code"> <path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path> </svg> </template> <template id="history-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path> </svg> </template> <template id="repo-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path> </svg> </template> <template id="bookmark-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bookmark"> <path d="M3 2.75C3 1.784 3.784 1 4.75 1h6.5c.966 0 1.75.784 1.75 1.75v11.5a.75.75 0 0 1-1.227.579L8 11.722l-3.773 3.107A.751.751 0 0 1 3 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.91l3.023-2.489a.75.75 0 0 1 .954 0l3.023 2.49V2.75a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="plus-circle-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-plus-circle"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm7.25-3.25v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5a.75.75 0 0 1 1.5 0Z"></path> </svg> </template> <template id="circle-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-dot-fill"> <path d="M8 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"></path> </svg> </template> <template id="trash-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-trash"> <path d="M11 1.75V3h2.25a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75ZM4.496 6.675l.66 6.6a.25.25 0 0 0 .249.225h5.19a.25.25 0 0 0 .249-.225l.66-6.6a.75.75 0 0 1 1.492.149l-.66 6.6A1.748 1.748 0 0 1 10.595 15h-5.19a1.75 1.75 0 0 1-1.741-1.575l-.66-6.6a.75.75 0 1 1 1.492-.15ZM6.5 1.75V3h3V1.75a.25.25 0 0 0-.25-.25h-2.5a.25.25 0 0 0-.25.25Z"></path> </svg> </template> <template id="team-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-people"> <path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path> </svg> </template> <template id="project-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path> </svg> </template> <template id="pencil-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pencil"> <path d="M11.013 1.427a1.75 1.75 0 0 1 2.474 0l1.086 1.086a1.75 1.75 0 0 1 0 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 0 1-.927-.928l.929-3.25c.081-.286.235-.547.445-.758l8.61-8.61Zm.176 4.823L9.75 4.81l-6.286 6.287a.253.253 0 0 0-.064.108l-.558 1.953 1.953-.558a.253.253 0 0 0 .108-.064Zm1.238-3.763a.25.25 0 0 0-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 0 0 0-.354Z"></path> </svg> </template> <template id="copilot-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copilot"> <path d="M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z"></path><path d="M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z"></path> </svg> </template> <template id="copilot-error-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copilot-error"> <path d="M16 11.24c0 .112-.072.274-.21.467L13 9.688V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-.198 0-.388-.009-.571-.029L6.833 5.226a4.01 4.01 0 0 0 .17-.782c.117-.935-.037-1.395-.241-1.614-.193-.206-.637-.413-1.682-.297-.683.076-1.115.231-1.395.415l-1.257-.91c.579-.564 1.413-.877 2.485-.996 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095Zm-5.083-8.707c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Zm2.511 11.074c-1.393.776-3.272 1.428-5.43 1.428-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.18-.455-.241-.963-.252-1.475L.31 4.107A.747.747 0 0 1 0 3.509V3.49a.748.748 0 0 1 .625-.73c.156-.026.306.047.435.139l14.667 10.578a.592.592 0 0 1 .227.264.752.752 0 0 1 .046.249v.022a.75.75 0 0 1-1.19.596Zm-1.367-.991L5.635 7.964a5.128 5.128 0 0 1-.889.073c-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433 1.539 0 3.089-.505 4.063-.934Z"></path> </svg> </template> <template id="workflow-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-workflow"> <path d="M0 1.75C0 .784.784 0 1.75 0h3.5C6.216 0 7 .784 7 1.75v3.5A1.75 1.75 0 0 1 5.25 7H4v4a1 1 0 0 0 1 1h4v-1.25C9 9.784 9.784 9 10.75 9h3.5c.966 0 1.75.784 1.75 1.75v3.5A1.75 1.75 0 0 1 14.25 16h-3.5A1.75 1.75 0 0 1 9 14.25v-.75H5A2.5 2.5 0 0 1 2.5 11V7h-.75A1.75 1.75 0 0 1 0 5.25Zm1.75-.25a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Zm9 9a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="book-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> </template> <template id="code-review-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code-review"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 13H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25v-8.5C0 1.784.784 1 1.75 1ZM1.5 2.75v8.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Zm5.28 1.72a.75.75 0 0 1 0 1.06L5.31 7l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.75.75 0 0 1 1.06 0Zm2.44 0a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L10.69 7 9.22 5.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </template> <template id="codespaces-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-codespaces"> <path d="M0 11.25c0-.966.784-1.75 1.75-1.75h12.5c.966 0 1.75.784 1.75 1.75v3A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm2-9.5C2 .784 2.784 0 3.75 0h8.5C13.216 0 14 .784 14 1.75v5a1.75 1.75 0 0 1-1.75 1.75h-8.5A1.75 1.75 0 0 1 2 6.75Zm1.75-.25a.25.25 0 0 0-.25.25v5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5a.25.25 0 0 0-.25-.25Zm-2 9.5a.25.25 0 0 0-.25.25v3c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-3a.25.25 0 0 0-.25-.25Z"></path><path d="M7 12.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path> </svg> </template> <template id="comment-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment"> <path d="M1 2.75C1 1.784 1.784 1 2.75 1h10.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 13.25 12H9.06l-2.573 2.573A1.458 1.458 0 0 1 4 13.543V12H2.75A1.75 1.75 0 0 1 1 10.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h4.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="comment-discussion-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment-discussion"> <path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path> </svg> </template> <template id="organization-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-organization"> <path d="M1.75 16A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 0 0 .25-.25V8.285a.25.25 0 0 0-.111-.208l-1.055-.703a.749.749 0 1 1 .832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0 1 14.25 16h-3.5a.766.766 0 0 1-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 0 1-.75-.75V14h-1v1.25a.75.75 0 0 1-.75.75Zm-.25-1.75c0 .138.112.25.25.25H4v-1.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 .75.75v1.25h2.25a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM3.75 6h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 3.75A.75.75 0 0 1 3.75 3h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 3.75Zm4 3A.75.75 0 0 1 7.75 6h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 7 6.75ZM7.75 3h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 9.75A.75.75 0 0 1 3.75 9h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 9.75ZM7.75 9h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z"></path> </svg> </template> <template id="rocket-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-rocket"> <path d="M14.064 0h.186C15.216 0 16 .784 16 1.75v.186a8.752 8.752 0 0 1-2.564 6.186l-.458.459c-.314.314-.641.616-.979.904v3.207c0 .608-.315 1.172-.833 1.49l-2.774 1.707a.749.749 0 0 1-1.11-.418l-.954-3.102a1.214 1.214 0 0 1-.145-.125L3.754 9.816a1.218 1.218 0 0 1-.124-.145L.528 8.717a.749.749 0 0 1-.418-1.11l1.71-2.774A1.748 1.748 0 0 1 3.31 4h3.204c.288-.338.59-.665.904-.979l.459-.458A8.749 8.749 0 0 1 14.064 0ZM8.938 3.623h-.002l-.458.458c-.76.76-1.437 1.598-2.02 2.5l-1.5 2.317 2.143 2.143 2.317-1.5c.902-.583 1.74-1.26 2.499-2.02l.459-.458a7.25 7.25 0 0 0 2.123-5.127V1.75a.25.25 0 0 0-.25-.25h-.186a7.249 7.249 0 0 0-5.125 2.123ZM3.56 14.56c-.732.732-2.334 1.045-3.005 1.148a.234.234 0 0 1-.201-.064.234.234 0 0 1-.064-.201c.103-.671.416-2.273 1.15-3.003a1.502 1.502 0 1 1 2.12 2.12Zm6.94-3.935c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 0 0 .119-.213ZM3.678 8.116 5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 0 0-.213.119l-1.2 1.95ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> </template> <template id="shield-check-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield-check"> <path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM11.28 6.28l-3.5 3.5a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.97-2.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </template> <template id="heart-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-heart"> <path d="m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z"></path> </svg> </template> <template id="server-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-server"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v4c0 .372-.116.717-.314 1 .198.283.314.628.314 1v4a1.75 1.75 0 0 1-1.75 1.75H1.75A1.75 1.75 0 0 1 0 12.75v-4c0-.358.109-.707.314-1a1.739 1.739 0 0 1-.314-1v-4C0 1.784.784 1 1.75 1ZM1.5 2.75v4c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Zm.25 5.75a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25ZM7 4.75A.75.75 0 0 1 7.75 4h4.5a.75.75 0 0 1 0 1.5h-4.5A.75.75 0 0 1 7 4.75ZM7.75 10h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM3 4.75A.75.75 0 0 1 3.75 4h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 4.75ZM3.75 10h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z"></path> </svg> </template> <template id="globe-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-globe"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM5.78 8.75a9.64 9.64 0 0 0 1.363 4.177c.255.426.542.832.857 1.215.245-.296.551-.705.857-1.215A9.64 9.64 0 0 0 10.22 8.75Zm4.44-1.5a9.64 9.64 0 0 0-1.363-4.177c-.307-.51-.612-.919-.857-1.215a9.927 9.927 0 0 0-.857 1.215A9.64 9.64 0 0 0 5.78 7.25Zm-5.944 1.5H1.543a6.507 6.507 0 0 0 4.666 5.5c-.123-.181-.24-.365-.352-.552-.715-1.192-1.437-2.874-1.581-4.948Zm-2.733-1.5h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.507 6.507 0 0 0-4.666 5.5Zm10.181 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.507 6.507 0 0 0 4.666-5.5Zm2.733-1.5a6.507 6.507 0 0 0-4.666-5.5c.123.181.24.365.353.552.714 1.192 1.436 2.874 1.58 4.948Z"></path> </svg> </template> <template id="issue-opened-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> </template> <template id="device-mobile-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-mobile"> <path d="M3.75 0h8.5C13.216 0 14 .784 14 1.75v12.5A1.75 1.75 0 0 1 12.25 16h-8.5A1.75 1.75 0 0 1 2 14.25V1.75C2 .784 2.784 0 3.75 0ZM3.5 1.75v12.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM8 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path> </svg> </template> <template id="package-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-package"> <path d="m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z"></path> </svg> </template> <template id="credit-card-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-credit-card"> <path d="M10.75 9a.75.75 0 0 0 0 1.5h1.5a.75.75 0 0 0 0-1.5h-1.5Z"></path><path d="M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 14H1.75A1.75 1.75 0 0 1 0 12.25ZM14.5 6.5h-13v5.75c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25Zm0-2.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25V5h13Z"></path> </svg> </template> <template id="play-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> </template> <template id="gift-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-gift"> <path d="M2 2.75A2.75 2.75 0 0 1 4.75 0c.983 0 1.873.42 2.57 1.232.268.318.497.668.68 1.042.183-.375.411-.725.68-1.044C9.376.42 10.266 0 11.25 0a2.75 2.75 0 0 1 2.45 4h.55c.966 0 1.75.784 1.75 1.75v2c0 .698-.409 1.301-1 1.582v4.918A1.75 1.75 0 0 1 13.25 16H2.75A1.75 1.75 0 0 1 1 14.25V9.332C.409 9.05 0 8.448 0 7.75v-2C0 4.784.784 4 1.75 4h.55c-.192-.375-.3-.8-.3-1.25ZM7.25 9.5H2.5v4.75c0 .138.112.25.25.25h4.5Zm1.5 0v5h4.5a.25.25 0 0 0 .25-.25V9.5Zm0-4V8h5.5a.25.25 0 0 0 .25-.25v-2a.25.25 0 0 0-.25-.25Zm-7 0a.25.25 0 0 0-.25.25v2c0 .138.112.25.25.25h5.5V5.5h-5.5Zm3-4a1.25 1.25 0 0 0 0 2.5h2.309c-.233-.818-.542-1.401-.878-1.793-.43-.502-.915-.707-1.431-.707ZM8.941 4h2.309a1.25 1.25 0 0 0 0-2.5c-.516 0-1 .205-1.43.707-.337.392-.646.975-.879 1.793Z"></path> </svg> </template> <template id="code-square-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code-square"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25Zm7.47 3.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L10.69 8 9.22 6.53a.75.75 0 0 1 0-1.06ZM6.78 6.53 5.31 8l1.47 1.47a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </template> <template id="device-desktop-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-desktop"> <path d="M14.25 1c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 14.25 12h-3.727c.099 1.041.52 1.872 1.292 2.757A.752.752 0 0 1 11.25 16h-6.5a.75.75 0 0 1-.565-1.243c.772-.885 1.192-1.716 1.292-2.757H1.75A1.75 1.75 0 0 1 0 10.25v-7.5C0 1.784.784 1 1.75 1ZM1.75 2.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25ZM9.018 12H6.982a5.72 5.72 0 0 1-.765 2.5h3.566a5.72 5.72 0 0 1-.765-2.5Z"></path> </svg> </template> <div class="position-relative"> <ul role="listbox" class="ActionListWrap QueryBuilder-ListWrap" aria-label="Suggestions" data-action=" combobox-commit:query-builder#comboboxCommit mousedown:query-builder#resultsMousedown " data-target="query-builder.resultsList" data-persist-list=false id="query-builder-test-results" ></ul> </div> <div class="FormControl-inlineValidation" id="validation-42a7a582-4b89-4319-a065-2172a9a4c356" hidden="hidden"> <span class="FormControl-inlineValidation--visual"> <svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-alert-fill"> <path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path> </svg> </span> <span></span> </div> </div> <div data-target="query-builder.screenReaderFeedback" aria-live="polite" aria-atomic="true" class="sr-only"></div> </query-builder></form> <div class="d-flex flex-row color-fg-muted px-3 text-small color-bg-default search-feedback-prompt"> <a target="_blank" href="https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax" data-view-component="true" class="Link color-fg-accent text-normal ml-2"> Search syntax tips </a> <div class="d-flex flex-1"></div> </div> </div> </div> </div> </modal-dialog></div> </div> <div data-action="click:qbsearch-input#retract" class="dark-backdrop position-fixed" hidden data-target="qbsearch-input.darkBackdrop"></div> <div class="color-fg-default"> <dialog-helper> <dialog data-target="qbsearch-input.feedbackDialog" data-action="close:qbsearch-input#handleDialogClose cancel:qbsearch-input#handleDialogClose" id="feedback-dialog" aria-modal="true" aria-labelledby="feedback-dialog-title" aria-describedby="feedback-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="feedback-dialog-title"> Provide feedback </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="feedback-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="feedback-dialog-title"> <div data-view-component="true" class="Overlay-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="code-search-feedback-form" data-turbo="false" action="/search/feedback" accept-charset="UTF-8" method="post"><input type="hidden" data-csrf="true" name="authenticity_token" value="pPPAF2Zjb3bThQaqn90axUHc/Te0+K9BRJmslzq6S16SaOJouLVvBHtqoUQMmoLtSQWthU1CCfcg0xZHvmvHzw==" /> <p>We read every piece of feedback, and take your input very seriously.</p> <textarea name="feedback" class="form-control width-full mb-2" style="height: 120px" id="feedback"></textarea> <input name="include_email" id="include_email" aria-label="Include my email address so I can be contacted" class="form-control mr-2" type="checkbox"> <label for="include_email" style="font-weight: normal">Include my email address so I can be contacted</label> </form></div> </scrollable-region> <div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="feedback-dialog" type="button" data-view-component="true" class="btn"> Cancel </button> <button form="code-search-feedback-form" data-action="click:qbsearch-input#submitFeedback" type="submit" data-view-component="true" class="btn-primary btn"> Submit feedback </button> </div> </dialog></dialog-helper> <custom-scopes data-target="qbsearch-input.customScopesManager"> <dialog-helper> <dialog data-target="custom-scopes.customScopesModalDialog" data-action="close:qbsearch-input#handleDialogClose cancel:qbsearch-input#handleDialogClose" id="custom-scopes-dialog" aria-modal="true" aria-labelledby="custom-scopes-dialog-title" aria-describedby="custom-scopes-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="custom-scopes-dialog-title"> Saved searches </h1> <h2 id="custom-scopes-dialog-description" class="Overlay-description">Use saved searches to filter your results more quickly</h2> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="custom-scopes-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="custom-scopes-dialog-title"> <div data-view-component="true" class="Overlay-body"> <div data-target="custom-scopes.customScopesModalDialogFlash"></div> <div hidden class="create-custom-scope-form" data-target="custom-scopes.createCustomScopeForm"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="custom-scopes-dialog-form" data-turbo="false" action="/search/custom_scopes" accept-charset="UTF-8" method="post"><input type="hidden" data-csrf="true" name="authenticity_token" value="5TkE/2JepRN389KQcrfIA/K7u6shstVnrdh4/SGlUscN77GfdARXifxlP5UpWFL7mDaz0zm5BpHveE/cjwgNXg==" /> <div data-target="custom-scopes.customScopesModalDialogFlash"></div> <input type="hidden" id="custom_scope_id" name="custom_scope_id" data-target="custom-scopes.customScopesIdField"> <div class="form-group"> <label for="custom_scope_name">Name</label> <auto-check src="/search/custom_scopes/check_name" required> <input type="text" name="custom_scope_name" id="custom_scope_name" data-target="custom-scopes.customScopesNameField" class="form-control" autocomplete="off" placeholder="github-ruby" required maxlength="50"> <input type="hidden" data-csrf="true" value="f71EJI+6OdrW8spk1YxntujPCupE5ufTvoBBkIpa8/JUF28En6LlDUeb1kgEkxE/QK3ef5HjzDCmziPeqAocYw==" /> </auto-check> </div> <div class="form-group"> <label for="custom_scope_query">Query</label> <input type="text" name="custom_scope_query" id="custom_scope_query" data-target="custom-scopes.customScopesQueryField" class="form-control" autocomplete="off" placeholder="(repo:mona/a OR repo:mona/b) AND lang:python" required maxlength="500"> </div> <p class="text-small color-fg-muted"> To see all available qualifiers, see our <a class="Link--inTextBlock" href="https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax">documentation</a>. </p> </form> </div> <div data-target="custom-scopes.manageCustomScopesForm"> <div data-target="custom-scopes.list"></div> </div> </div> </scrollable-region> <div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd Overlay-footer--divided"> <button data-action="click:custom-scopes#customScopesCancel" type="button" data-view-component="true" class="btn"> Cancel </button> <button form="custom-scopes-dialog-form" data-action="click:custom-scopes#customScopesSubmit" data-target="custom-scopes.customScopesSubmitButton" type="submit" data-view-component="true" class="btn-primary btn"> Create saved search </button> </div> </dialog></dialog-helper> </custom-scopes> </div> </qbsearch-input> <div class="position-relative HeaderMenu-link-wrap d-lg-inline-block"> <a href="/login?return_to=https%3A%2F%2Fgithub.com%2FJosephSilber%2Fbouncer" class="HeaderMenu-link HeaderMenu-link--sign-in HeaderMenu-button flex-shrink-0 no-underline d-none d-lg-inline-flex border border-lg-0 rounded rounded-lg-0 px-2 py-1" style="margin-left: 12px;" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/JosephSilber/bouncer&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="3542db330f4ead6f6f614f8d124d286798408c65fe7a4e1ff9e491884b710f94" data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to go to homepage&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Sign in;ref_loc:Header&quot;}" > Sign in </a> </div> <a href="/signup?ref_cta=Sign+up&amp;ref_loc=header+logged+out&amp;ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&amp;source=header-repo&amp;source_repo=JosephSilber%2Fbouncer" class="HeaderMenu-link HeaderMenu-link--sign-up HeaderMenu-button flex-shrink-0 d-flex d-lg-inline-flex no-underline border color-border-default rounded px-2 py-1" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/JosephSilber/bouncer&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="3542db330f4ead6f6f614f8d124d286798408c65fe7a4e1ff9e491884b710f94" data-analytics-event="{&quot;category&quot;:&quot;Sign up&quot;,&quot;action&quot;:&quot;click to sign up for account&quot;,&quot;label&quot;:&quot;ref_page:/&lt;user-name&gt;/&lt;repo-name&gt;;ref_cta:Sign up;ref_loc:header logged out&quot;}" > Sign up </a> <button type="button" class="sr-only js-header-menu-focus-trap d-block d-lg-none">Reseting focus</button> </div> </div> </div> </div> </header> <div hidden="hidden" data-view-component="true" class="js-stale-session-flash stale-session-flash flash flash-warn flash-full"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <span class="js-stale-session-flash-signed-in" hidden>You signed in with another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <span class="js-stale-session-flash-signed-out" hidden>You signed out in another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <span class="js-stale-session-flash-switched" hidden>You switched accounts on another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <button id="icon-button-a4d7c453-80a7-48b8-9d58-385b24314143" aria-labelledby="tooltip-b74177ef-5ce8-4e9c-9aaf-e6df98668b46" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium flash-close js-flash-close"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x Button-visual"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button><tool-tip id="tooltip-b74177ef-5ce8-4e9c-9aaf-e6df98668b46" for="icon-button-a4d7c453-80a7-48b8-9d58-385b24314143" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Dismiss alert</tool-tip> </div> </div> <div id="start-of-content" class="show-on-focus"></div> <div id="js-flash-container" class="flash-container" data-turbo-replace> <template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div> </div> </div> </div> </template> </div> <div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" > <div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--page-header-bgColor, var(--color-page-header-bg));" data-turbo-replace> <div class="d-flex flex-nowrap flex-justify-end mb-3 px-3 px-lg-5" style="gap: 1rem;"> <div class="flex-auto min-width-0 width-fit"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path> </svg> <span class="author flex-self-stretch" itemprop="author"> <a class="url fn" rel="author" data-hovercard-type="user" data-hovercard-url="/users/JosephSilber/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/JosephSilber"> JosephSilber </a> </span> <span class="mx-1 flex-self-stretch color-fg-muted">/</span> <strong itemprop="name" class="mr-2 flex-self-stretch"> <a data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="/JosephSilber/bouncer">bouncer</a> </strong> <span></span><span class="Label Label--secondary v-align-middle mr-1">Public</span> </div> </div> <div id="repository-details-container" class="flex-shrink-0" data-turbo-replace style="max-width: 70%;"> <ul class="pagehead-actions flex-shrink-0 d-none d-md-inline" style="padding: 2px 0;"> <li> <a href="/login?return_to=%2FJosephSilber%2Fbouncer" rel="nofollow" id="repository-details-watch-button" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;notification subscription menu watch&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/JosephSilber/bouncer&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="eb40b4562125be7f4eb59b4519b93379c9d61eb97915d8ac5c843cd76d278b5a" aria-label="You must be signed in to change notification settings" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path> </svg>Notifications </a> <tool-tip id="tooltip-3f182f99-9c83-43c0-80af-db589d215672" for="repository-details-watch-button" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be signed in to change notification settings</tool-tip> </li> <li> <a icon="repo-forked" id="fork-button" href="/login?return_to=%2FJosephSilber%2Fbouncer" rel="nofollow" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;repo details fork button&quot;,&quot;repository_id&quot;:42622303,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/JosephSilber/bouncer&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d7e9a9c81a9cbfb0a00200d1d15310a240a0818020ac60315d733c2bdf7f56ca" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg>Fork <span id="repo-network-counter" data-pjax-replace="true" data-turbo-replace="true" title="332" data-view-component="true" class="Counter">332</span> </a> </li> <li> <div data-view-component="true" class="BtnGroup d-flex"> <a href="/login?return_to=%2FJosephSilber%2Fbouncer" rel="nofollow" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;star button&quot;,&quot;repository_id&quot;:42622303,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/JosephSilber/bouncer&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="732455e452d48f64459ae3cc1e0adb55fba708120ab8442bdc3b706348b146ea" aria-label="You must be signed in to star a repository" data-view-component="true" class="tooltipped tooltipped-sw btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg><span data-view-component="true" class="d-inline"> Star </span> <span id="repo-stars-counter-star" aria-label="3454 users starred this repository" data-singular-suffix="user starred this repository" data-plural-suffix="users starred this repository" data-turbo-replace="true" title="3,454" data-view-component="true" class="Counter js-social-count">3.5k</span> </a></div> </li> </ul> </div> </div> <div id="responsive-meta-container" data-turbo-replace> <div class="d-block d-md-none mb-2 px-3 px-md-4 px-lg-5"> <p class="f4 mb-3 "> Laravel Eloquent roles and abilities. </p> <h3 class="sr-only">License</h3> <div class="mb-2"> <a href="/JosephSilber/bouncer/blob/master/LICENSE.txt" class="Link--muted" data-analytics-event="{&quot;category&quot;:&quot;Repository Overview&quot;,&quot;action&quot;:&quot;click&quot;,&quot;label&quot;:&quot;location:sidebar;file:license&quot;}" > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-law mr-2"> <path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path> </svg> MIT license </a> </div> <div class="mb-3"> <a class="Link--secondary no-underline mr-3" href="/JosephSilber/bouncer/stargazers"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star mr-1"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg> <span class="text-bold">3.5k</span> stars </a> <a class="Link--secondary no-underline mr-3" href="/JosephSilber/bouncer/forks"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-1"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg> <span class="text-bold">332</span> forks </a> <a class="Link--secondary no-underline mr-3 d-inline-block" href="/JosephSilber/bouncer/branches"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch mr-1"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path> </svg> <span>Branches</span> </a> <a class="Link--secondary no-underline d-inline-block" href="/JosephSilber/bouncer/tags"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-tag mr-1"> <path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path> </svg> <span>Tags</span> </a> <a class="Link--secondary no-underline d-inline-block" href="/JosephSilber/bouncer/activity"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pulse mr-1"> <path d="M6 2c.306 0 .582.187.696.471L10 10.731l1.304-3.26A.751.751 0 0 1 12 7h3.25a.75.75 0 0 1 0 1.5h-2.742l-1.812 4.528a.751.751 0 0 1-1.392 0L6 4.77 4.696 8.03A.75.75 0 0 1 4 8.5H.75a.75.75 0 0 1 0-1.5h2.742l1.812-4.529A.751.751 0 0 1 6 2Z"></path> </svg> <span>Activity</span> </a> </div> <div class="d-flex flex-wrap gap-2"> <div class="flex-1"> <div data-view-component="true" class="BtnGroup d-flex"> <a href="/login?return_to=%2FJosephSilber%2Fbouncer" rel="nofollow" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;star button&quot;,&quot;repository_id&quot;:42622303,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/JosephSilber/bouncer&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="732455e452d48f64459ae3cc1e0adb55fba708120ab8442bdc3b706348b146ea" aria-label="You must be signed in to star a repository" data-view-component="true" class="tooltipped tooltipped-sw btn-sm btn btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg><span data-view-component="true" class="d-inline"> Star </span> </a></div> </div> <div class="flex-1"> <a href="/login?return_to=%2FJosephSilber%2Fbouncer" rel="nofollow" id="files-overview-watch-button" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;notification subscription menu watch&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/JosephSilber/bouncer&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="eb40b4562125be7f4eb59b4519b93379c9d61eb97915d8ac5c843cd76d278b5a" aria-label="You must be signed in to change notification settings" data-view-component="true" class="btn-sm btn btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path> </svg>Notifications </a> <tool-tip id="tooltip-1ff98094-4084-44e5-ab96-c431c1320ffb" for="files-overview-watch-button" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be signed in to change notification settings</tool-tip> </div> <span> </span> </div> </div> </div> <nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5"> <ul data-view-component="true" class="UnderlineNav-body list-style-none"> <li data-view-component="true" class="d-inline-flex"> <a id="code-tab" href="/JosephSilber/bouncer" data-tab-item="i0code-tab" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages repo_deployments repo_attestations /JosephSilber/bouncer" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g c" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Code&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" aria-current="page" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item selected"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> <span data-content="Code">Code</span> <span id="code-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="issues-tab" href="/JosephSilber/bouncer/issues" data-tab-item="i1issues-tab" data-selected-links="repo_issues repo_labels repo_milestones /JosephSilber/bouncer/issues" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g i" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Issues&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> <span data-content="Issues">Issues</span> <span id="issues-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="45" data-view-component="true" class="Counter">45</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="pull-requests-tab" href="/JosephSilber/bouncer/pulls" data-tab-item="i2pull-requests-tab" data-selected-links="repo_pulls checks /JosephSilber/bouncer/pulls" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g p" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Pull requests&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path> </svg> <span data-content="Pull requests">Pull requests</span> <span id="pull-requests-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="7" data-view-component="true" class="Counter">7</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="actions-tab" href="/JosephSilber/bouncer/actions" data-tab-item="i3actions-tab" data-selected-links="repo_actions /JosephSilber/bouncer/actions" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g a" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Actions&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> <span data-content="Actions">Actions</span> <span id="actions-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="projects-tab" href="/JosephSilber/bouncer/projects" data-tab-item="i4projects-tab" data-selected-links="repo_projects new_repo_project repo_project /JosephSilber/bouncer/projects" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g b" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Projects&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path> </svg> <span data-content="Projects">Projects</span> <span id="projects-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="0" hidden="hidden" data-view-component="true" class="Counter">0</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="wiki-tab" href="/JosephSilber/bouncer/wiki" data-tab-item="i5wiki-tab" data-selected-links="repo_wiki /JosephSilber/bouncer/wiki" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g w" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Wiki&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> <span data-content="Wiki">Wiki</span> <span id="wiki-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="security-tab" href="/JosephSilber/bouncer/security" data-tab-item="i6security-tab" data-selected-links="security overview alerts policy token_scanning code_scanning /JosephSilber/bouncer/security" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g s" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Security&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <span data-content="Security">Security</span> <include-fragment src="/JosephSilber/bouncer/security/overall-count" accept="text/fragment+html"></include-fragment> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="insights-tab" href="/JosephSilber/bouncer/pulse" data-tab-item="i7insights-tab" data-selected-links="repo_graphs repo_contributors dependency_graph dependabot_updates pulse people community /JosephSilber/bouncer/pulse" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Insights&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> <span data-content="Insights">Insights</span> <span id="insights-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> </ul> <div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <action-menu data-select-variant="none" data-view-component="true"> <focus-group direction="vertical" mnemonics retain> <button id="action-menu-b4edb032-8edf-4dcb-a749-4134dee9ec46-button" popovertarget="action-menu-b4edb032-8edf-4dcb-a749-4134dee9ec46-overlay" aria-controls="action-menu-b4edb032-8edf-4dcb-a749-4134dee9ec46-list" aria-haspopup="true" aria-labelledby="tooltip-65bc7850-72d3-4796-9ef6-7b78561cfad4" type="button" data-view-component="true" class="Button Button--iconOnly Button--secondary Button--medium UnderlineNav-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-65bc7850-72d3-4796-9ef6-7b78561cfad4" for="action-menu-b4edb032-8edf-4dcb-a749-4134dee9ec46-button" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Additional navigation options</tool-tip> <anchored-position id="action-menu-b4edb032-8edf-4dcb-a749-4134dee9ec46-overlay" anchor="action-menu-b4edb032-8edf-4dcb-a749-4134dee9ec46-button" align="start" side="outside-bottom" anchor-offset="normal" popover="auto" data-view-component="true"> <div data-view-component="true" class="Overlay Overlay--size-auto"> <div data-view-component="true" class="Overlay-body Overlay-body--paddingNone"> <action-list> <div data-view-component="true"> <ul aria-labelledby="action-menu-b4edb032-8edf-4dcb-a749-4134dee9ec46-button" id="action-menu-b4edb032-8edf-4dcb-a749-4134dee9ec46-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap"> <li hidden="hidden" data-menu-item="i0code-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-be368fd1-ff9e-41ea-af7a-ecff53e45eb2" href="/JosephSilber/bouncer" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Code </span> </a> </li> <li hidden="hidden" data-menu-item="i1issues-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-1bd88358-49e7-4f39-8824-a6fb7251e6a9" href="/JosephSilber/bouncer/issues" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Issues </span> </a> </li> <li hidden="hidden" data-menu-item="i2pull-requests-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-8f4ec063-ba08-4106-b1ab-b189c78d1661" href="/JosephSilber/bouncer/pulls" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Pull requests </span> </a> </li> <li hidden="hidden" data-menu-item="i3actions-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-d85bf4a8-71a8-47c3-8405-ad49e804da7a" href="/JosephSilber/bouncer/actions" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Actions </span> </a> </li> <li hidden="hidden" data-menu-item="i4projects-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-2d00bdb5-d09a-4154-8bae-ecc5b89c6889" href="/JosephSilber/bouncer/projects" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Projects </span> </a> </li> <li hidden="hidden" data-menu-item="i5wiki-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-2a87290f-db0e-47e2-b035-d2b7af4039d5" href="/JosephSilber/bouncer/wiki" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Wiki </span> </a> </li> <li hidden="hidden" data-menu-item="i6security-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-28a41191-dc3f-4448-908e-4d715213e802" href="/JosephSilber/bouncer/security" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Security </span> </a> </li> <li hidden="hidden" data-menu-item="i7insights-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-d08c1b2a-e1b9-4e0f-9c0c-77888b81ffef" href="/JosephSilber/bouncer/pulse" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Insights </span> </a> </li> </ul> </div></action-list> </div> </div></anchored-position> </focus-group> </action-menu></div> </nav> </div> <turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " > <h1 class='sr-only'>JosephSilber/bouncer</h1> <div class="clearfix container-xl px-md-4 px-lg-5 px-3"> <div> <div style="max-width: 100%" data-view-component="true" class="Layout Layout--flowRow-until-md react-repos-overview-margin Layout--sidebarPosition-end Layout--sidebarPosition-flowRow-end"> <div data-view-component="true" class="Layout-main"> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/primer-react-765944243383.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-core-cd0a67881543.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-lib-7b7b5264f6c1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/octicons-react-45c3a19dd792.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_emotion_is-prop-valid_dist_emotion-is-prop-valid_esm_js-node_modules_emo-62da9f-54c0c921f04b.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-e7dcdd-285fc29e9fa5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover-fn_js-4896ddd4b7bb.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_tanstack_query-core_build_modern_queryObserver_js-node_modules_tanstack_-defd52-585c05e837f3.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_hydro-analytics-client_dist_analytics-client_js-node_modules_gith-9002b0-8e5e346f0cbe.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_aria-live_aria-live_ts-ui_packages_promise-with-resolvers-polyfill_promise-with-r-014121-e1792bd5a31e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_paths_index_ts-193243317670.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_ref-selector_RefSelector_tsx-7a75d9f22fe9.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_hydro-analytics_hydro-analytics_ts-ui_packages_verified-fetch_verified-fetch_ts-u-4672d1-0996d093463a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_code-view-shared_hooks_use-file-page-payload_ts-ui_packages_code-view-shared_comp-1beb66-b07e414af699.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_commit-attribution_index_ts-ui_packages_commit-checks-status_index_ts-ui_packages-7207c9-0305ce7c88aa.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repos-overview-ff98ded74203.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.9fa170e9435ed4b922b9.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/repos-overview.9cc263aa0716ce801059.module.css" /> <react-partial partial-name="repos-overview" data-ssr="true" data-attempted-ssr="true" > <script type="application/json" data-target="react-partial.embeddedData">{"props":{"initialPayload":{"allShortcutsEnabled":false,"path":"/","repo":{"id":42622303,"defaultBranch":"master","name":"bouncer","ownerLogin":"JosephSilber","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2015-09-17T00:34:40.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1403741?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"master","listCacheKey":"v0:1710426664.0","canEdit":false,"refType":"branch","currentOid":"e08d597a43488281ec09de138e372075c4e013af"},"tree":{"items":[{"name":".github/workflows","path":".github/workflows","contentType":"directory","hasSimplifiedPath":true},{"name":"assets/branding","path":"assets/branding","contentType":"directory","hasSimplifiedPath":true},{"name":"middleware","path":"middleware","contentType":"directory"},{"name":"migrations","path":"migrations","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":"workbench","path":"workbench","contentType":"directory"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE.txt","path":"LICENSE.txt","contentType":"file"},{"name":"composer.json","path":"composer.json","contentType":"file"},{"name":"phpunit.xml","path":"phpunit.xml","contentType":"file"},{"name":"readme.md","path":"readme.md","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":null,"totalCount":13,"showBranchInfobar":false},"fileTree":null,"fileTreeProcessingTime":null,"foldersToFetch":[],"treeExpanded":false,"symbolsExpanded":false,"isOverview":true,"overview":{"banners":{"shouldRecommendReadme":false,"isPersonalRepo":false,"showUseActionBanner":false,"actionSlug":null,"actionId":null,"showProtectBranchBanner":false,"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_repo","releasePath":"/JosephSilber/bouncer/releases/new?marketplace=true","showPublishActionBanner":false},"interactionLimitBanner":null,"showInvitationBanner":false,"inviterName":null,"actionsMigrationBannerInfo":{"releaseTags":[],"showImmutableActionsMigrationBanner":false,"initialMigrationStatus":null}},"codeButton":{"contactPath":"/contact","isEnterprise":false,"local":{"protocolInfo":{"httpAvailable":true,"sshAvailable":null,"httpUrl":"https://github.com/JosephSilber/bouncer.git","showCloneWarning":null,"sshUrl":null,"sshCertificatesRequired":null,"sshCertificatesAvailable":null,"ghCliUrl":"gh repo clone JosephSilber/bouncer","defaultProtocol":"http","newSshKeyUrl":"/settings/ssh/new","setProtocolPath":"/users/set_protocol"},"platformInfo":{"cloneUrl":"https://desktop.github.com","showVisualStudioCloneButton":false,"visualStudioCloneUrl":"https://windows.github.com","showXcodeCloneButton":false,"xcodeCloneUrl":"xcode://clone?repo=https%3A%2F%2Fgithub.com%2FJosephSilber%2Fbouncer","zipballUrl":"/JosephSilber/bouncer/archive/refs/heads/master.zip"}},"newCodespacePath":"/codespaces/new?hide_repo_select=true\u0026repo=42622303"},"popovers":{"rename":null,"renamedParentRepo":null},"commitCount":"658","overviewFiles":[{"displayName":"readme.md","repoName":"bouncer","refName":"master","path":"readme.md","preferredFileType":"readme","tabName":"README","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cp dir=\"auto\"\u003e\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://user-images.githubusercontent.com/1403741/39606419-587dbb1e-4f03-11e8-8e54-1bb2f39fb0f5.jpg\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/1403741/39606419-587dbb1e-4f03-11e8-8e54-1bb2f39fb0f5.jpg\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eBouncer\u003c/h1\u003e\u003ca id=\"user-content-bouncer\" class=\"anchor\" aria-label=\"Permalink: Bouncer\" href=\"#bouncer\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\n\u003ca href=\"https://github.com/JosephSilber/bouncer/actions\"\u003e\u003cimg src=\"https://github.com/JosephSilber/bouncer/actions/workflows/tests.yml/badge.svg\" alt=\"Build Status\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/silber/bouncer\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/934f9de32429e54a0e48efb04a839d29ec708c60a7062cbf3f28f457ef64c4a9/68747470733a2f2f706f7365722e707567782e6f72672f73696c6265722f626f756e6365722f642f746f74616c2e737667\" alt=\"Total Downloads\" data-canonical-src=\"https://poser.pugx.org/silber/bouncer/d/total.svg\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/JosephSilber/bouncer/blob/master/LICENSE.txt\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/63facf7d1e9525d3210f5519bd21f5ad094804e54b48de00d850b42dc721dfa9/68747470733a2f2f706f7365722e707567782e6f72672f73696c6265722f626f756e6365722f6c6963656e73652e737667\" alt=\"License\" data-canonical-src=\"https://poser.pugx.org/silber/bouncer/license.svg\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eBouncer is an elegant, framework-agnostic approach to managing roles and abilities for any app using Eloquent models.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTable of Contents\u003c/h2\u003e\u003ca id=\"user-content-table-of-contents\" class=\"anchor\" aria-label=\"Permalink: Table of Contents\" href=\"#table-of-contents\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdetails\u003e\u003csummary\u003eClick to expand\u003c/summary\u003e\u003cp dir=\"auto\"\u003e\n\u003c/p\u003e\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#introduction\"\u003eIntroduction\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#installing-bouncer-in-a-laravel-app\"\u003eInstalling Bouncer in a Laravel app\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#installing-bouncer-in-a-non-laravel-app\"\u003eInstalling Bouncer in a non-Laravel app\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#enabling-cache\"\u003eEnabling cache\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#creating-roles-and-abilities\"\u003eCreating roles and abilities\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#assigning-roles-to-a-user\"\u003eAssigning roles to a user\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#giving-a-user-an-ability-directly\"\u003eGiving a user an ability directly\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#restricting-an-ability-to-a-model\"\u003eRestricting an ability to a model\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#allowing-a-user-or-role-to-own-a-model\"\u003eAllowing a user or role to \"own\" a model\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#retracting-a-role-from-a-user\"\u003eRetracting a role from a user\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#removing-an-ability\"\u003eRemoving an ability\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#forbidding-an-ability\"\u003eForbidding an ability\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#unforbidding-an-ability\"\u003eUnforbidding an ability\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#checking-a-users-roles\"\u003eChecking a user's roles\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#querying-users-by-their-roles\"\u003eQuerying users by their roles\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#getting-all-roles-for-a-user\"\u003eGetting all roles for a user\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#getting-all-abilities-for-a-user\"\u003eGetting all abilities for a user\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#authorizing-users\"\u003eAuthorizing users\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#blade-directives\"\u003eBlade directives\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#refreshing-the-cache\"\u003eRefreshing the cache\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#multi-tenancy\"\u003eMulti-tenancy\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#the-scope-middleware\"\u003eThe scope middleware\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#customizing-bouncers-scope\"\u003eCustomizing Bouncer's scope\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#cache\"\u003eCache\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#tables\"\u003eTables\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#custom-models\"\u003eCustom models\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#user-model\"\u003eUser Model\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#ownership\"\u003eOwnership\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#faq\"\u003eFAQ\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#where-do-i-set-up-my-apps-roles-and-abilities\"\u003eWhere do I set up my app's roles and abilities?\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#can-i-use-a-different-set-of-roles--abilities-for-the-public--dashboard-sections-of-my-site-respectively\"\u003eCan I use a different set of roles \u0026amp; abilities for the public \u0026amp; dashboard sections of my site, respectively?\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-the-specified-key-was-too-long\"\u003eI'm trying to run the migration, but I'm getting a SQL error that the \"specified key was too long\"\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-there-is-a-syntax-error-or-access-violation-1064--to-use-near-json-not-null\"\u003eI'm trying to run the migration, but I'm getting a SQL error that there is a \"Syntax error or access violation: 1064 ... to use near json not null)\"\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#console-commands\"\u003eConsole commands\u003c/a\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"#bouncerclean\"\u003e\u003ccode\u003ebouncer:clean\u003c/code\u003e\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#cheat-sheet\"\u003eCheat sheet\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#alternative\"\u003eAlternative\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003e\u003c/p\u003e\u003c/details\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eIntroduction\u003c/h2\u003e\u003ca id=\"user-content-introduction\" class=\"anchor\" aria-label=\"Permalink: Introduction\" href=\"#introduction\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBouncer is an elegant, framework-agnostic approach to managing roles and abilities for any app using Eloquent models. With an expressive and fluent syntax, it stays out of your way as much as possible: use it when you want, ignore it when you don't.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor a quick, glanceable list of Bouncer's features, check out \u003ca href=\"#cheat-sheet\"\u003ethe cheat sheet\u003c/a\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eBouncer works well with other abilities you have hard-coded in your own app. Your code always takes precedence: if your code allows an action, Bouncer will not interfere.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eOnce installed, you can simply tell the bouncer what you want to allow at the gate:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"// Give a user the ability to create posts\nBouncer::allow($user)-\u0026gt;to('create', Post::class);\n\n// Alternatively, do it through a role\nBouncer::allow('admin')-\u0026gt;to('create', Post::class);\nBouncer::assign('admin')-\u0026gt;to($user);\n\n// You can also grant an ability only to a specific model\nBouncer::allow($user)-\u0026gt;to('edit', $post);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-c\"\u003e// Give a user the ability to create posts\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ecreate\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\n\u003cspan class=\"pl-c\"\u003e// Alternatively, do it through a role\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ecreate\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eassign\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// You can also grant an ability only to a specific model\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eedit\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWhen you check abilities at Laravel's gate, Bouncer will automatically be consulted. If Bouncer sees an ability that has been granted to the current user (whether directly, or through a role) it'll authorize the check.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInstallation\u003c/h2\u003e\u003ca id=\"user-content-installation\" class=\"anchor\" aria-label=\"Permalink: Installation\" href=\"#installation\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote\u003c/strong\u003e: Bouncer v1.0.2 requires PHP 8.2+ and Laravel/Eloquent 11+.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIf you're on Laravel v6-v10, use \u003ca href=\"https://github.com/JosephSilber/bouncer/tree/v1.0.1\"\u003eBouncer v1.0.1\u003c/a\u003e. If you're on Laravel v5.5-v5.8, use \u003ca href=\"https://github.com/JosephSilber/bouncer/tree/v1.0.0-rc.6\"\u003eBouncer RC6\u003c/a\u003e.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInstalling Bouncer in a Laravel app\u003c/h3\u003e\u003ca id=\"user-content-installing-bouncer-in-a-laravel-app\" class=\"anchor\" aria-label=\"Permalink: Installing Bouncer in a Laravel app\" href=\"#installing-bouncer-in-a-laravel-app\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eInstall Bouncer with \u003ca href=\"https://getcomposer.org/doc/00-intro.md\" rel=\"nofollow\"\u003ecomposer\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"composer require silber/bouncer\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ecomposer require silber/bouncer\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eAdd Bouncer's trait to your user model:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Silber\\Bouncer\\Database\\HasRolesAndAbilities;\n\nclass User extends Model\n{\n use HasRolesAndAbilities;\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eHasRolesAndAbilities\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextends\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eModel\u003c/span\u003e\n{\n \u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eHasRolesAndAbilities\u003c/span\u003e;\n}\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eNow, to run Bouncer's migrations. First publish the migrations into your app's \u003ccode\u003emigrations\u003c/code\u003e directory, by running the following command:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"php artisan vendor:publish --tag=\u0026quot;bouncer.migrations\u0026quot;\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ephp artisan vendor:publish --tag=\"bouncer.migrations\"\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eFinally, run the migrations:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"php artisan migrate\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ephp artisan migrate\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eFacade\u003c/h4\u003e\u003ca id=\"user-content-facade\" class=\"anchor\" aria-label=\"Permalink: Facade\" href=\"#facade\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWhenever you use the \u003ccode\u003eBouncer\u003c/code\u003e facade in your code, remember to add this line to your namespace imports at the top of the file:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Bouncer;\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e;\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eFor more information about Laravel Facades, refer to \u003ca href=\"https://laravel.com/docs/11.x/facades\" rel=\"nofollow\"\u003ethe Laravel documentation\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInstalling Bouncer in a non-Laravel app\u003c/h3\u003e\u003ca id=\"user-content-installing-bouncer-in-a-non-laravel-app\" class=\"anchor\" aria-label=\"Permalink: Installing Bouncer in a non-Laravel app\" href=\"#installing-bouncer-in-a-non-laravel-app\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eInstall Bouncer with \u003ca href=\"https://getcomposer.org/doc/00-intro.md\" rel=\"nofollow\"\u003ecomposer\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"composer require silber/bouncer\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ecomposer require silber/bouncer\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eSet up the database with \u003ca href=\"https://github.com/illuminate/database/blob/master/README.md\"\u003ethe Eloquent Capsule component\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Illuminate\\Database\\Capsule\\Manager as Capsule;\n\n$capsule = new Capsule;\n\n$capsule-\u0026gt;addConnection([/* connection config */]);\n\n$capsule-\u0026gt;setAsGlobal();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eIlluminate\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eCapsule\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eManager\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eas\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eCapsule\u003c/span\u003e;\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ecapsule\u003c/span\u003e = \u003cspan class=\"pl-k\"\u003enew\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eCapsule\u003c/span\u003e;\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ecapsule\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eaddConnection\u003c/span\u003e([\u003cspan class=\"pl-c\"\u003e/* connection config */\u003c/span\u003e]);\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ecapsule\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003esetAsGlobal\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eRefer to \u003ca href=\"https://github.com/illuminate/database/blob/master/README.md\"\u003ethe Eloquent Capsule documentation\u003c/a\u003e for more details.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eRun the migrations by either of the following methods:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eUse a tool such as \u003ca href=\"https://github.com/michaeldyrynda/vagabond\"\u003evagabond\u003c/a\u003e to run Laravel migrations outside of a Laravel app. You'll find the necessary migrations in \u003ca href=\"https://github.com/JosephSilber/bouncer/blob/master/migrations/create_bouncer_tables.php#L18-L79\"\u003ethe migrations stub file\u003c/a\u003e.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eAlternatively, you can run \u003ca href=\"https://github.com/JosephSilber/bouncer/blob/master/migrations/sql/MySQL.sql\"\u003ethe raw SQL\u003c/a\u003e directly in your database.\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eAdd Bouncer's trait to your user model:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Illuminate\\Database\\Eloquent\\Model;\nuse Silber\\Bouncer\\Database\\HasRolesAndAbilities;\n\nclass User extends Model\n{\n use HasRolesAndAbilities;\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eIlluminate\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eEloquent\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eModel\u003c/span\u003e;\n\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eHasRolesAndAbilities\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextends\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eModel\u003c/span\u003e\n{\n \u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eHasRolesAndAbilities\u003c/span\u003e;\n}\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eCreate an instance of Bouncer:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Silber\\Bouncer\\Bouncer;\n\n$bouncer = Bouncer::create();\n\n// If you are in a request with a current user\n// that you'd wish to check permissions for,\n// pass that user to the \u0026quot;create\u0026quot; method:\n$bouncer = Bouncer::create($user);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e;\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ebouncer\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecreate\u003c/span\u003e();\n\n\u003cspan class=\"pl-c\"\u003e// If you are in a request with a current user\u003c/span\u003e\n\u003cspan class=\"pl-c\"\u003e// that you'd wish to check permissions for,\u003c/span\u003e\n\u003cspan class=\"pl-c\"\u003e// pass that user to the \"create\" method:\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ebouncer\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecreate\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf you're using dependency injection in your app, you may register the \u003ccode\u003eBouncer\u003c/code\u003e instance as a singleton in the container:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Silber\\Bouncer\\Bouncer;\nuse Illuminate\\Container\\Container;\n\nContainer::getInstance()-\u0026gt;singleton(Bouncer::class, function () {\n return Bouncer::create();\n});\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e;\n\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eIlluminate\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eContainer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eContainer\u003c/span\u003e;\n\n\u003cspan class=\"pl-v\"\u003eContainer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003egetInstance\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-en\"\u003esingleton\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::class, \u003cspan class=\"pl-k\"\u003efunction\u003c/span\u003e () {\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecreate\u003c/span\u003e();\n});\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can now inject \u003ccode\u003eBouncer\u003c/code\u003e into any class that needs it.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003ecreate\u003c/code\u003e method creates a \u003ccode\u003eBouncer\u003c/code\u003e instance with sensible defaults. To fully customize it, use the \u003ccode\u003emake\u003c/code\u003e method to get a factory instance. Call \u003ccode\u003ecreate()\u003c/code\u003e on the factory to create the \u003ccode\u003eBouncer\u003c/code\u003e instance:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Silber\\Bouncer\\Bouncer;\n\n$bouncer = Bouncer::make()\n -\u0026gt;withCache($customCacheInstance)\n -\u0026gt;create();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e;\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ebouncer\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003emake\u003c/span\u003e()\n -\u0026gt;\u003cspan class=\"pl-en\"\u003ewithCache\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ecustomCacheInstance\u003c/span\u003e)\n -\u0026gt;\u003cspan class=\"pl-en\"\u003ecreate\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eCheck out \u003ca href=\"https://github.com/JosephSilber/bouncer/blob/c974953a0b1d8d187023002cdfae1800f3ccdb02/src/Factory.php\"\u003ethe \u003ccode\u003eFactory\u003c/code\u003e class\u003c/a\u003e to see all the customizations available.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eSet which model is used as the user model throughout your app:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$bouncer-\u0026gt;useUserModel(User::class);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ebouncer\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003euseUserModel\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e::class);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eFor additional configuration, check out \u003ca href=\"#configuration\"\u003ethe Configuration section\u003c/a\u003e below.\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eEnabling cache\u003c/h3\u003e\u003ca id=\"user-content-enabling-cache\" class=\"anchor\" aria-label=\"Permalink: Enabling cache\" href=\"#enabling-cache\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBy default, Bouncer's queries are cached for the current request. For better performance, you may want to \u003ca href=\"#cache\"\u003eenable cross-request caching\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUsage\u003c/h2\u003e\u003ca id=\"user-content-usage\" class=\"anchor\" aria-label=\"Permalink: Usage\" href=\"#usage\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAdding roles and abilities to users is made extremely easy. You do not have to create a role or an ability in advance. Simply pass the name of the role/ability, and Bouncer will create it if it doesn't exist.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote:\u003c/strong\u003e the examples below all use the \u003ccode\u003eBouncer\u003c/code\u003e facade. If you don't use facades, you can instead inject an instance of \u003ccode\u003eSilber\\Bouncer\\Bouncer\u003c/code\u003e into your class.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCreating roles and abilities\u003c/h3\u003e\u003ca id=\"user-content-creating-roles-and-abilities\" class=\"anchor\" aria-label=\"Permalink: Creating roles and abilities\" href=\"#creating-roles-and-abilities\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eLet's create a role called \u003ccode\u003eadmin\u003c/code\u003e and give it the ability to \u003ccode\u003eban-users\u003c/code\u003e from our site:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow('admin')-\u0026gt;to('ban-users');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThat's it. Behind the scenes, Bouncer will create both a \u003ccode\u003eRole\u003c/code\u003e model and an \u003ccode\u003eAbility\u003c/code\u003e model for you.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIf you want to add additional attributes to the role/ability, such as a human-readable title, you can manually create them using the \u003ccode\u003erole\u003c/code\u003e and \u003ccode\u003eability\u003c/code\u003e methods on the \u003ccode\u003eBouncer\u003c/code\u003e class:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$admin = Bouncer::role()-\u0026gt;firstOrCreate([\n 'name' =\u0026gt; 'admin',\n 'title' =\u0026gt; 'Administrator',\n]);\n\n$ban = Bouncer::ability()-\u0026gt;firstOrCreate([\n 'name' =\u0026gt; 'ban-users',\n 'title' =\u0026gt; 'Ban users',\n]);\n\nBouncer::allow($admin)-\u0026gt;to($ban);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eadmin\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003erole\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-en\"\u003efirstOrCreate\u003c/span\u003e([\n \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ename\u003c/span\u003e'\u003c/span\u003e =\u0026gt; \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003etitle\u003c/span\u003e'\u003c/span\u003e =\u0026gt; \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eAdministrator\u003c/span\u003e'\u003c/span\u003e,\n]);\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eban\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eability\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-en\"\u003efirstOrCreate\u003c/span\u003e([\n \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ename\u003c/span\u003e'\u003c/span\u003e =\u0026gt; \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003etitle\u003c/span\u003e'\u003c/span\u003e =\u0026gt; \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eBan users\u003c/span\u003e'\u003c/span\u003e,\n]);\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eadmin\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eban\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAssigning roles to a user\u003c/h3\u003e\u003ca id=\"user-content-assigning-roles-to-a-user\" class=\"anchor\" aria-label=\"Permalink: Assigning roles to a user\" href=\"#assigning-roles-to-a-user\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo now give the \u003ccode\u003eadmin\u003c/code\u003e role to a user, simply tell the bouncer that the given user should be assigned the admin role:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::assign('admin')-\u0026gt;to($user);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eassign\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAlternatively, you can call the \u003ccode\u003eassign\u003c/code\u003e method directly on the user:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$user-\u0026gt;assign('admin');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eassign\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGiving a user an ability directly\u003c/h3\u003e\u003ca id=\"user-content-giving-a-user-an-ability-directly\" class=\"anchor\" aria-label=\"Permalink: Giving a user an ability directly\" href=\"#giving-a-user-an-ability-directly\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSometimes you might want to give a user an ability directly, without using a role:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow($user)-\u0026gt;to('ban-users');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eHere too you can accomplish the same directly off of the user:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$user-\u0026gt;allow('ban-users');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eRestricting an ability to a model\u003c/h3\u003e\u003ca id=\"user-content-restricting-an-ability-to-a-model\" class=\"anchor\" aria-label=\"Permalink: Restricting an ability to a model\" href=\"#restricting-an-ability-to-a-model\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSometimes you might want to restrict an ability to a specific model type. Simply pass the model name as a second argument:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow($user)-\u0026gt;to('edit', Post::class);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eedit\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf you want to restrict the ability to a specific model instance, pass in the actual model instead:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow($user)-\u0026gt;to('edit', $post);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eedit\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAllowing a user or role to \"own\" a model\u003c/h3\u003e\u003ca id=\"user-content-allowing-a-user-or-role-to-own-a-model\" class=\"anchor\" aria-label=\"Permalink: Allowing a user or role to \u0026quot;own\u0026quot; a model\" href=\"#allowing-a-user-or-role-to-own-a-model\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eUse the \u003ccode\u003etoOwn\u003c/code\u003e method to allow users to manage \u003cem\u003etheir own\u003c/em\u003e models:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow($user)-\u0026gt;toOwn(Post::class);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoOwn\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eNow, when checking at the gate whether the user may perform an action on a given post, the post's \u003ccode\u003euser_id\u003c/code\u003e will be compared to the logged-in user's \u003ccode\u003eid\u003c/code\u003e (\u003ca href=\"#ownership\"\u003ethis can be customized\u003c/a\u003e). If they match, the gate will allow the action.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe above will grant all abilities on a user's \"owned\" models. You can restrict the abilities by following it up with a call to the \u003ccode\u003eto\u003c/code\u003e method:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow($user)-\u0026gt;toOwn(Post::class)-\u0026gt;to('view');\n\n// Or pass it an array of abilities:\nBouncer::allow($user)-\u0026gt;toOwn(Post::class)-\u0026gt;to(['view', 'update']);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoOwn\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eview\u003c/span\u003e'\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// Or pass it an array of abilities:\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoOwn\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e([\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eview\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eupdate\u003c/span\u003e'\u003c/span\u003e]);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can also allow users to own all \u003cem\u003etypes\u003c/em\u003e of models in your application:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow($user)-\u0026gt;toOwnEverything();\n\n// And to restrict ownership to a given ability\nBouncer::allow($user)-\u0026gt;toOwnEverything()-\u0026gt;to('view');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoOwnEverything\u003c/span\u003e();\n\n\u003cspan class=\"pl-c\"\u003e// And to restrict ownership to a given ability\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoOwnEverything\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eview\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eRetracting a role from a user\u003c/h3\u003e\u003ca id=\"user-content-retracting-a-role-from-a-user\" class=\"anchor\" aria-label=\"Permalink: Retracting a role from a user\" href=\"#retracting-a-role-from-a-user\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe bouncer can also retract a previously-assigned role from a user:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::retract('admin')-\u0026gt;from($user);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eretract\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003efrom\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eOr do it directly on the user:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$user-\u0026gt;retract('admin');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eretract\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eRemoving an ability\u003c/h3\u003e\u003ca id=\"user-content-removing-an-ability\" class=\"anchor\" aria-label=\"Permalink: Removing an ability\" href=\"#removing-an-ability\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe bouncer can also remove an ability previously granted to a user:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::disallow($user)-\u0026gt;to('ban-users');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eOr directly on the user:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$user-\u0026gt;disallow('ban-users');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote:\u003c/strong\u003e if the user has a role that allows them to \u003ccode\u003eban-users\u003c/code\u003e, they will still have that ability. To disallow it, either remove the ability from the role or retract the role from the user.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp dir=\"auto\"\u003eIf the ability has been granted through a role, tell the bouncer to remove the ability from the role instead:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::disallow('admin')-\u0026gt;to('ban-users');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo remove an ability for a specific model type, pass in its name as a second argument:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::disallow($user)-\u0026gt;to('delete', Post::class);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\u003c/pre\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eWarning:\u003c/strong\u003e if the user has an ability to \u003ccode\u003edelete\u003c/code\u003e a specific \u003ccode\u003e$post\u003c/code\u003e instance, the code above will \u003cem\u003enot\u003c/em\u003e remove that ability. You will have to remove the ability separately - by passing in the actual \u003ccode\u003e$post\u003c/code\u003e as a second argument - as shown below.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp dir=\"auto\"\u003eTo remove an ability for a specific model instance, pass in the actual model instead:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::disallow($user)-\u0026gt;to('delete', $post);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote\u003c/strong\u003e: the \u003ccode\u003edisallow\u003c/code\u003e method only removes abilities that were previously given to this user/role. If you want to disallow a subset of what a more-general ability has allowed, use \u003ca href=\"#forbidding-an-ability\"\u003ethe \u003ccode\u003eforbid\u003c/code\u003e method\u003c/a\u003e.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eForbidding an ability\u003c/h3\u003e\u003ca id=\"user-content-forbidding-an-ability\" class=\"anchor\" aria-label=\"Permalink: Forbidding an ability\" href=\"#forbidding-an-ability\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBouncer also allows you to \u003ccode\u003eforbid\u003c/code\u003e a given ability, for more fine-grained control. At times you may wish to grant a user/role an ability that covers a wide range of actions, but then restrict a small subset of those actions.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eHere are some examples:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eYou might allow a user to generally view all documents, but have a specific highly-classified document that they should not be allowed to view:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow($user)-\u0026gt;to('view', Document::class);\n\nBouncer::forbid($user)-\u0026gt;to('view', $classifiedDocument);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eview\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eDocument\u003c/span\u003e::class);\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eforbid\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eview\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eclassifiedDocument\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eYou may wish to allow your \u003ccode\u003esuperadmin\u003c/code\u003es to do everything in your app, including adding/removing users. Then you may have an \u003ccode\u003eadmin\u003c/code\u003e role that can do everything \u003cem\u003ebesides\u003c/em\u003e managing users:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow('superadmin')-\u0026gt;everything();\n\nBouncer::allow('admin')-\u0026gt;everything();\nBouncer::forbid('admin')-\u0026gt;toManage(User::class);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esuperadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eeverything\u003c/span\u003e();\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eeverything\u003c/span\u003e();\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eforbid\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoManage\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e::class);\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eYou may wish to occasionally ban users, removing their permission to all abilities. However, actually removing all of their roles \u0026amp; abilities would mean that when the ban is removed we'll have to figure out what their original roles and abilities were.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eUsing a forbidden ability means that they can keep all their existing roles and abilities, but still not be authorized for anything. We can accomplish this by creating a special \u003ccode\u003ebanned\u003c/code\u003e role, for which we'll forbid everything:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::forbid('banned')-\u0026gt;everything();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eforbid\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ebanned\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eeverything\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThen, whenever we want to ban a user, we'll assign them the \u003ccode\u003ebanned\u003c/code\u003e role:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::assign('banned')-\u0026gt;to($user);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eassign\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ebanned\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo remove the ban, we'll simply retract the role from the user:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::retract('banned')-\u0026gt;from($user);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eretract\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ebanned\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003efrom\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003eAs you can see, Bouncer's forbidden abilities gives you a lot of granular control over the permissions in your app.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUnforbidding an ability\u003c/h3\u003e\u003ca id=\"user-content-unforbidding-an-ability\" class=\"anchor\" aria-label=\"Permalink: Unforbidding an ability\" href=\"#unforbidding-an-ability\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo remove a forbidden ability, use the \u003ccode\u003eunforbid\u003c/code\u003e method:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::unforbid($user)-\u0026gt;to('view', $classifiedDocument);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eunforbid\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eview\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eclassifiedDocument\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote\u003c/strong\u003e: this will remove any previously-forbidden ability. It will \u003cem\u003enot\u003c/em\u003e authomatically allow the ability if it's not already allowed by a different regular ability granted to this user/role.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eChecking a user's roles\u003c/h3\u003e\u003ca id=\"user-content-checking-a-users-roles\" class=\"anchor\" aria-label=\"Permalink: Checking a user's roles\" href=\"#checking-a-users-roles\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote\u003c/strong\u003e: Generally speaking, you should not have a need to check roles directly. It is better to allow a role certain abilities, then check for those abilities instead. If what you need is very general, you can create very broad abilities. For example, an \u003ccode\u003eaccess-dashboard\u003c/code\u003e ability is always better than checking for \u003ccode\u003eadmin\u003c/code\u003e or \u003ccode\u003eeditor\u003c/code\u003e roles directly. For the rare occasion that you do want to check a role, that functionality is available here.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp dir=\"auto\"\u003eThe bouncer can check if a user has a specific role:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::is($user)-\u0026gt;a('moderator');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003ea\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf the role you're checking starts with a vowel, you might want to use the \u003ccode\u003ean\u003c/code\u003e alias method:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::is($user)-\u0026gt;an('admin');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003ean\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eFor the inverse, you can also check if a user \u003cem\u003edoesn't\u003c/em\u003e have a specific role:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::is($user)-\u0026gt;notA('moderator');\n\nBouncer::is($user)-\u0026gt;notAn('admin');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003enotA\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e);\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003enotAn\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can check if a user has one of many roles:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::is($user)-\u0026gt;a('moderator', 'editor');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003ea\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can also check if the user has all of the given roles:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::is($user)-\u0026gt;all('editor', 'moderator');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eall\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can also check if a user has none of the given roles:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::is($user)-\u0026gt;notAn('editor', 'moderator');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003enotAn\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThese checks can also be done directly on the user:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$user-\u0026gt;isAn('admin');\n$user-\u0026gt;isA('subscriber');\n\n$user-\u0026gt;isNotAn('admin');\n$user-\u0026gt;isNotA('subscriber');\n\n$user-\u0026gt;isAll('editor', 'moderator');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisAn\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisA\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esubscriber\u003c/span\u003e'\u003c/span\u003e);\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisNotAn\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisNotA\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esubscriber\u003c/span\u003e'\u003c/span\u003e);\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisAll\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eQuerying users by their roles\u003c/h3\u003e\u003ca id=\"user-content-querying-users-by-their-roles\" class=\"anchor\" aria-label=\"Permalink: Querying users by their roles\" href=\"#querying-users-by-their-roles\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can query your users by whether they have a given role:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$users = User::whereIs('admin')-\u0026gt;get();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eusers\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ewhereIs\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eget\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou may also pass in multiple roles, to query for users that have \u003cem\u003eany\u003c/em\u003e of the given roles:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$users = User::whereIs('superadmin', 'admin')-\u0026gt;get();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eusers\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ewhereIs\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esuperadmin\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eget\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo query for users who have \u003cem\u003eall\u003c/em\u003e of the given roles, use the \u003ccode\u003ewhereIsAll\u003c/code\u003e method:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$users = User::whereIsAll('sales', 'marketing')-\u0026gt;get();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eusers\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ewhereIsAll\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esales\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emarketing\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eget\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGetting all roles for a user\u003c/h3\u003e\u003ca id=\"user-content-getting-all-roles-for-a-user\" class=\"anchor\" aria-label=\"Permalink: Getting all roles for a user\" href=\"#getting-all-roles-for-a-user\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can get all roles for a user directly from the user model:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$roles = $user-\u0026gt;getRoles();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eroles\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003egetRoles\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGetting all abilities for a user\u003c/h3\u003e\u003ca id=\"user-content-getting-all-abilities-for-a-user\" class=\"anchor\" aria-label=\"Permalink: Getting all abilities for a user\" href=\"#getting-all-abilities-for-a-user\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can get all abilities for a user directly from the user model:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$abilities = $user-\u0026gt;getAbilities();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eabilities\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003egetAbilities\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThis will return a collection of the user's allowed abilities, including any abilities granted to the user through their roles.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eYou can also get a list of abilities that have been \u003cem\u003eexplicitly\u003c/em\u003e forfidden:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$forbiddenAbilities = $user-\u0026gt;getForbiddenAbilities();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eforbiddenAbilities\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003egetForbiddenAbilities\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAuthorizing users\u003c/h3\u003e\u003ca id=\"user-content-authorizing-users\" class=\"anchor\" aria-label=\"Permalink: Authorizing users\" href=\"#authorizing-users\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAuthorizing users is handled directly at \u003ca href=\"https://laravel.com/docs/11.x/authorization#gates\" rel=\"nofollow\"\u003eLaravel's \u003ccode\u003eGate\u003c/code\u003e\u003c/a\u003e, or on the user model (\u003ccode\u003e$user-\u0026gt;can($ability)\u003c/code\u003e).\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor convenience, the \u003ccode\u003eBouncer\u003c/code\u003e class provides these passthrough methods:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::can($ability);\nBouncer::can($ability, $model);\n\nBouncer::canAny($abilities);\nBouncer::canAny($abilities, $model);\n\nBouncer::cannot($ability);\nBouncer::cannot($ability, $model);\n\nBouncer::authorize($ability);\nBouncer::authorize($ability, $model);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecan\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eability\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecan\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eability\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emodel\u003c/span\u003e);\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecanAny\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eabilities\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecanAny\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eabilities\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emodel\u003c/span\u003e);\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecannot\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eability\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecannot\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eability\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emodel\u003c/span\u003e);\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eauthorize\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eability\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eauthorize\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eability\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emodel\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThese call directly into their equivalent methods on the \u003ccode\u003eGate\u003c/code\u003e class.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eBlade directives\u003c/h3\u003e\u003ca id=\"user-content-blade-directives\" class=\"anchor\" aria-label=\"Permalink: Blade directives\" href=\"#blade-directives\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBouncer does not add its own blade directives. Since Bouncer works directly with Laravel's gate, simply use its \u003ccode\u003e@can\u003c/code\u003e directive to check for the current user's abilities:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-basic notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"@can ('update', $post)\n \u0026lt;a href=\u0026quot;{{ route('post.update', $post) }}\u0026quot;\u0026gt;Edit Post\u0026lt;/a\u0026gt;\n@endcan\"\u003e\u003cpre\u003e@can ('update', $post)\n \u003cspan class=\"pl-kos\"\u003e\u0026lt;\u003c/span\u003e\u003cspan class=\"pl-ent\"\u003ea\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003ehref\u003c/span\u003e=\"\u003cspan class=\"pl-s\"\u003e{{ route('post.update', $post) }}\u003c/span\u003e\"\u003cspan class=\"pl-kos\"\u003e\u0026gt;\u003c/span\u003eEdit Post\u003cspan class=\"pl-kos\"\u003e\u0026lt;/\u003c/span\u003e\u003cspan class=\"pl-ent\"\u003ea\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e\u0026gt;\u003c/span\u003e\n@endcan\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSince checking for roles directly is generally \u003ca href=\"#checking-a-users-roles\"\u003enot recommended\u003c/a\u003e, Bouncer does not ship with a separate directive for that. If you still insist on checking for roles, you can do so using the general \u003ccode\u003e@if\u003c/code\u003e directive:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"@if ($user-\u0026gt;isAn('admin'))\n //\n@endif\"\u003e\u003cpre\u003e@\u003cspan class=\"pl-en\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisAn\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e))\n //\n@endif\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eRefreshing the cache\u003c/h3\u003e\u003ca id=\"user-content-refreshing-the-cache\" class=\"anchor\" aria-label=\"Permalink: Refreshing the cache\" href=\"#refreshing-the-cache\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAll queries executed by Bouncer are cached for the current request. If you enable \u003ca href=\"#cache\"\u003ecross-request caching\u003c/a\u003e, the cache will persist across different requests.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eWhenever you need, you can fully refresh the bouncer's cache:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::refresh();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003erefresh\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote:\u003c/strong\u003e fully refreshing the cache for all users uses \u003ca href=\"https://laravel.com/docs/11.x/cache#cache-tags\" rel=\"nofollow\"\u003ecache tags\u003c/a\u003e if they're available. Not all cache drivers support this. Refer to \u003ca href=\"https://laravel.com/docs/11.x/cache#cache-tags\" rel=\"nofollow\"\u003eLaravel's documentation\u003c/a\u003e to see if your driver supports cache tags. If your driver does not support cache tags, calling \u003ccode\u003erefresh\u003c/code\u003e might be a little slow, depending on the amount of users in your system.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp dir=\"auto\"\u003eAlternatively, you can refresh the cache only for a specific user:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::refreshFor($user);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003erefreshFor\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote\u003c/strong\u003e: When using \u003ca href=\"#multi-tenancy\"\u003emulti-tenancy scopes\u003c/a\u003e, this will only refresh the cache for the user in the current scope's context. To clear cached data for the same user in a different scope context, it must be called from within that scope.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMulti-tenancy\u003c/h2\u003e\u003ca id=\"user-content-multi-tenancy\" class=\"anchor\" aria-label=\"Permalink: Multi-tenancy\" href=\"#multi-tenancy\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBouncer fully supports multi-tenant apps, allowing you to seamlessly integrate Bouncer's roles and abilities for all tenants within the same app.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eThe scope middleware\u003c/h3\u003e\u003ca id=\"user-content-the-scope-middleware\" class=\"anchor\" aria-label=\"Permalink: The scope middleware\" href=\"#the-scope-middleware\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo get started, first publish \u003ca href=\"https://github.com/JosephSilber/bouncer/blob/master/middleware/ScopeBouncer.php\"\u003ethe scope middleware\u003c/a\u003e into your app:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"php artisan vendor:publish --tag=\u0026quot;bouncer.middleware\u0026quot;\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ephp artisan vendor:publish --tag=\"bouncer.middleware\"\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe middleware will now be published to \u003ccode\u003eapp/Http/Middleware/ScopeBouncer.php\u003c/code\u003e. This middleware is where you tell Bouncer which tenant to use for the current request. For example, assuming your users all have an \u003ccode\u003eaccount_id\u003c/code\u003e attribute, this is what your middleware would look like:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"public function handle($request, Closure $next)\n{\n $tenantId = $request-\u0026gt;user()-\u0026gt;account_id;\n\n Bouncer::scope()-\u0026gt;to($tenantId);\n\n return $next($request);\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003epublic\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efunction\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ehandle\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003erequest\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003e\u003cspan class=\"pl-smi\"\u003eClosure\u003c/span\u003e\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003enext\u003c/span\u003e)\n{\n \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003etenantId\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003erequest\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003euser\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-c1\"\u003eaccount_id\u003c/span\u003e;\n\n \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003escope\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003etenantId\u003c/span\u003e);\n\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003enext\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003erequest\u003c/span\u003e);\n}\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou are of course free to modify this middleware to fit your app's needs, such as pulling the tenant information from a subdomain et al.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eNow with the middleware in place, be sure to register it in your \u003ca href=\"https://github.com/laravel/laravel/blob/73cff166c79cdeaef1c6b7ec6e71a33a7ea3012d/app/Http/Kernel.php#L30-L38\"\u003eHTTP Kernel\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"protected $middlewareGroups = [\n 'web' =\u0026gt; [\n // Keep the existing middleware here, and add this:\n \\App\\Http\\Middleware\\ScopeBouncer::class,\n ]\n];\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eprotected\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emiddlewareGroups\u003c/span\u003e = [\n \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eweb\u003c/span\u003e'\u003c/span\u003e =\u0026gt; [\n \u003cspan class=\"pl-c\"\u003e// Keep the existing middleware here, and add this:\u003c/span\u003e\n \\\u003cspan class=\"pl-v\"\u003eApp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eHttp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eMiddleware\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eScopeBouncer\u003c/span\u003e::class,\n ]\n];\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAll of Bouncer's queries will now be scoped to the given tenant.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCustomizing Bouncer's scope\u003c/h3\u003e\u003ca id=\"user-content-customizing-bouncers-scope\" class=\"anchor\" aria-label=\"Permalink: Customizing Bouncer's scope\" href=\"#customizing-bouncers-scope\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDepending on your app's setup, you may not actually want \u003cem\u003eall\u003c/em\u003e of the queries to be scoped to the current tenant. For example, you may have a fixed set of roles/abilities that are the same for all tenants, and only allow your users to control which users are assigned which roles, and which roles have which abilities. To achieve this, you can tell Bouncer's scope to only scope the relationships between Bouncer's models, but not the models themselves:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::scope()-\u0026gt;to($tenantId)-\u0026gt;onlyRelations();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003escope\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003etenantId\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eonlyRelations\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eFurthermore, your app might not even allow its users to control which abilities a given role has. In that case, tell Bouncer's scope to exclude role abilities from the scope, so that those relationships stay global across all tenants:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::scope()-\u0026gt;to($tenantId)-\u0026gt;onlyRelations()-\u0026gt;dontScopeRoleAbilities();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003escope\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003etenantId\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eonlyRelations\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-en\"\u003edontScopeRoleAbilities\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf your needs are even more specialized than what's outlined above, you can create your own \u003ca href=\"https://github.com/JosephSilber/bouncer/blob/ab2b92d4d2379be3220daaf0d4185ea10237ff2b/src/Contracts/Scope.php\"\u003e\u003ccode\u003eScope\u003c/code\u003e\u003c/a\u003e with whatever custom logic you need:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Silber\\Bouncer\\Contracts\\Scope;\n\nclass MyScope implements Scope\n{\n // Whatever custom logic your app needs\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eContracts\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eScope\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyScope\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eimplements\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScope\u003c/span\u003e\n{\n \u003cspan class=\"pl-c\"\u003e// Whatever custom logic your app needs\u003c/span\u003e\n}\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThen, in a service provider, register your custom scope:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::scope(new MyScope);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003escope\u003c/span\u003e(\u003cspan class=\"pl-k\"\u003enew\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eMyScope\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBouncer will call the methods on the \u003ccode\u003eScope\u003c/code\u003e interface at various points in its execution. You are free to handle them according to your specific needs.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eConfiguration\u003c/h2\u003e\u003ca id=\"user-content-configuration\" class=\"anchor\" aria-label=\"Permalink: Configuration\" href=\"#configuration\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBouncer ships with sensible defaults, so most of the time there should be no need for any configuration. For finer-grained control, Bouncer can be customized by calling various configuration methods on the \u003ccode\u003eBouncer\u003c/code\u003e class.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIf you only use one or two of these config options, you can stick them into your \u003ca href=\"https://github.com/laravel/laravel/blob/e077976680bdb2644698fb8965a1e2a8710b5d4b/app/Providers/AppServiceProvider.php#L24-L27\"\u003emain \u003ccode\u003eAppServiceProvider\u003c/code\u003e's \u003ccode\u003eboot\u003c/code\u003e method\u003c/a\u003e. If they start growing, you may create a separate \u003ccode\u003eBouncerServiceProvider\u003c/code\u003e class in \u003ca href=\"https://github.com/laravel/laravel/tree/e077976680bdb2644698fb8965a1e2a8710b5d4b/app/Providers\"\u003eyour \u003ccode\u003eapp/Providers\u003c/code\u003e directory\u003c/a\u003e (remember to register it in \u003ca href=\"https://github.com/laravel/laravel/blob/e077976680bdb2644698fb8965a1e2a8710b5d4b/config/app.php#L171-L178\"\u003ethe \u003ccode\u003eproviders\u003c/code\u003e config array\u003c/a\u003e).\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCache\u003c/h3\u003e\u003ca id=\"user-content-cache\" class=\"anchor\" aria-label=\"Permalink: Cache\" href=\"#cache\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBy default, all queries executed by Bouncer are cached for the current request. For better performance, you may want to use cross-request caching:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::cache();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecache\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eWarning:\u003c/strong\u003e if you enable cross-request caching, you are responsible to refresh the cache whenever you make changes to user's roles/abilities. For how to refresh the cache, read \u003ca href=\"#refreshing-the-cache\"\u003erefreshing the cache\u003c/a\u003e.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp dir=\"auto\"\u003eOn the contrary, you may at times wish to \u003cem\u003ecompletely disable\u003c/em\u003e the cache, even within the same request:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::dontCache();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edontCache\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThis is particularly useful in unit tests, when you want to run assertions against roles/abilities that have just been granted.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTables\u003c/h3\u003e\u003ca id=\"user-content-tables\" class=\"anchor\" aria-label=\"Permalink: Tables\" href=\"#tables\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo change the database table names used by Bouncer, pass an associative array to the \u003ccode\u003etables\u003c/code\u003e method. The keys should be Bouncer's default table names, and the values should be the table names you wish to use. You do not have to pass in all tables names; only the ones you wish to change.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::tables([\n 'abilities' =\u0026gt; 'my_abilities',\n 'permissions' =\u0026gt; 'granted_abilities',\n]);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003etables\u003c/span\u003e([\n \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eabilities\u003c/span\u003e'\u003c/span\u003e =\u0026gt; \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emy_abilities\u003c/span\u003e'\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003epermissions\u003c/span\u003e'\u003c/span\u003e =\u0026gt; \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003egranted_abilities\u003c/span\u003e'\u003c/span\u003e,\n]);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBouncer's published migration uses the table names from this configuration, so be sure to have these in place before actually running the migration.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCustom models\u003c/h3\u003e\u003ca id=\"user-content-custom-models\" class=\"anchor\" aria-label=\"Permalink: Custom models\" href=\"#custom-models\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can easily extend Bouncer's built-in \u003ccode\u003eRole\u003c/code\u003e and \u003ccode\u003eAbility\u003c/code\u003e models:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"namespace App\\Models;\n\nuse Silber\\Bouncer\\Database\\Ability as BouncerAbility;\n\nclass Ability extends BouncerAbility\n{\n // custom code\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003enamespace\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eApp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eModels\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eAbility\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eas\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBouncerAbility\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAbility\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextends\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBouncerAbility\u003c/span\u003e\n{\n \u003cspan class=\"pl-c\"\u003e// custom code\u003c/span\u003e\n}\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"namespace App\\Models;\n\nuse Silber\\Bouncer\\Database\\Role as BouncerRole;\n\nclass Role extends BouncerRole\n{\n // custom code\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003enamespace\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eApp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eModels\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eRole\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eas\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBouncerRole\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eRole\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextends\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBouncerRole\u003c/span\u003e\n{\n \u003cspan class=\"pl-c\"\u003e// custom code\u003c/span\u003e\n}\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAlternatively, you can use Bouncer's \u003ccode\u003eIsAbility\u003c/code\u003e and \u003ccode\u003eIsRole\u003c/code\u003e traits without actually extending any of Bouncer's models:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"namespace App\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Silber\\Bouncer\\Database\\Concerns\\IsAbility;\n\nclass Ability extends Model\n{\n use IsAbility;\n\n // custom code\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003enamespace\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eApp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eModels\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eIlluminate\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eEloquent\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eModel\u003c/span\u003e;\n\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eConcerns\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eIsAbility\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eAbility\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextends\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eModel\u003c/span\u003e\n{\n \u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eIsAbility\u003c/span\u003e;\n\n \u003cspan class=\"pl-c\"\u003e// custom code\u003c/span\u003e\n}\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"namespace App\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Silber\\Bouncer\\Database\\Concerns\\IsRole;\n\nclass Role extends Model\n{\n use IsRole;\n\n // custom code\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003enamespace\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eApp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eModels\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eIlluminate\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eEloquent\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eModel\u003c/span\u003e;\n\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSilber\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eConcerns\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eIsRole\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eRole\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextends\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eModel\u003c/span\u003e\n{\n \u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eIsRole\u003c/span\u003e;\n\n \u003cspan class=\"pl-c\"\u003e// custom code\u003c/span\u003e\n}\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf you use the traits instead of extending Bouncer's models, be sure to set the proper \u003ccode\u003e$table\u003c/code\u003e name and \u003ccode\u003e$fillable\u003c/code\u003e fields yourself.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eRegardless of which method you use, the next step is to actually tell Bouncer to use your custom models:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::useAbilityModel(\\App\\Models\\Ability::class);\nBouncer::useRoleModel(\\App\\Models\\Role::class);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003euseAbilityModel\u003c/span\u003e(\\\u003cspan class=\"pl-v\"\u003eApp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eModels\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eAbility\u003c/span\u003e::class);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003euseRoleModel\u003c/span\u003e(\\\u003cspan class=\"pl-v\"\u003eApp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eModels\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eRole\u003c/span\u003e::class);\u003c/pre\u003e\u003c/div\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote\u003c/strong\u003e: Eloquent determines the foreign key of relationships based on the parent model name (see \u003ca href=\"https://laravel.com/docs/11.x/eloquent-relationships#one-to-one\" rel=\"nofollow\"\u003ethe Eloquent docs\u003c/a\u003e). To keep things simple, name your custom classes the same as Bouncer's: \u003ccode\u003eAbility\u003c/code\u003e and \u003ccode\u003eRole\u003c/code\u003e, respectively.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIf you need to use different names, be sure to either update your migration file or override the relationship methods to explicitly set their foreign keys.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUser Model\u003c/h3\u003e\u003ca id=\"user-content-user-model\" class=\"anchor\" aria-label=\"Permalink: User Model\" href=\"#user-model\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBy default, Bouncer automatically \u003ca href=\"https://github.com/JosephSilber/bouncer/blob/462f312/src/BouncerServiceProvider.php#L171-L190\"\u003euses the user model of the default auth guard\u003c/a\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIf you're using Bouncer with a non-default guard, and it uses a different user model, you should let Bouncer know about the user model you want to use:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::useUserModel(\\App\\Admin::class);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003euseUserModel\u003c/span\u003e(\\\u003cspan class=\"pl-v\"\u003eApp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eAdmin\u003c/span\u003e::class);\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eOwnership\u003c/h3\u003e\u003ca id=\"user-content-ownership\" class=\"anchor\" aria-label=\"Permalink: Ownership\" href=\"#ownership\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIn Bouncer, the concept of ownership is used to \u003ca href=\"#allowing-a-user-or-role-to-own-a-model\"\u003eallow users to perform actions on models they \"own\"\u003c/a\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eBy default, Bouncer will check the model's \u003ccode\u003euser_id\u003c/code\u003e against the current user's primary key. If needed, this can be set to a different attribute:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::ownedVia('userId');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eownedVia\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003euserId\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf different models use different columns for ownership, you can register them separately:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::ownedVia(Post::class, 'created_by');\nBouncer::ownedVia(Order::class, 'entered_by');\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eownedVia\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ecreated_by\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eownedVia\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eOrder\u003c/span\u003e::class, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eentered_by\u003c/span\u003e'\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eFor greater control, you can pass a closure with your custom logic:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::ownedVia(Game::class, function ($game, $user) {\n return $game-\u0026gt;team_id == $user-\u0026gt;team_id;\n});\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eownedVia\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eGame\u003c/span\u003e::class, \u003cspan class=\"pl-k\"\u003efunction\u003c/span\u003e (\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003egame\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e) {\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003egame\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003eteam_id\u003c/span\u003e == \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003eteam_id\u003c/span\u003e;\n});\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eFAQ\u003c/h2\u003e\u003ca id=\"user-content-faq\" class=\"anchor\" aria-label=\"Permalink: FAQ\" href=\"#faq\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThere are some concepts in Bouncer that people keep on asking about, so here's a short list of some of those topics:\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eWhere do I set up my app's roles and abilities?\u003c/h3\u003e\u003ca id=\"user-content-where-do-i-set-up-my-apps-roles-and-abilities\" class=\"anchor\" aria-label=\"Permalink: Where do I set up my app's roles and abilities?\" href=\"#where-do-i-set-up-my-apps-roles-and-abilities\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSeeding the initial roles and abilities can be done in a regular \u003ca href=\"https://laravel.com/docs/11.x/seeding\" rel=\"nofollow\"\u003eLaravel seeder\u003c/a\u003e class. Start by creating a specific seeder file for Bouncer:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"php artisan make:seeder BouncerSeeder\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ephp artisan make:seeder BouncerSeeder\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ePlace all of your seeding roles \u0026amp; abilities code in \u003ca href=\"https://github.com/laravel/framework/blob/f50e2004dfa40de895cd841a0a94acef5b417900/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub#L12-L15\"\u003ethe seeder's \u003ccode\u003erun\u003c/code\u003e method\u003c/a\u003e. Here's an example of what that might look like:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Bouncer;\nuse Illuminate\\Database\\Seeder;\n\nclass BouncerSeeder extends Seeder\n{\n public function run()\n {\n Bouncer::allow('superadmin')-\u0026gt;everything();\n\n Bouncer::allow('admin')-\u0026gt;everything();\n Bouncer::forbid('admin')-\u0026gt;toManage(User::class);\n\n Bouncer::allow('editor')-\u0026gt;to('create', Post::class);\n Bouncer::allow('editor')-\u0026gt;toOwn(Post::class);\n\n // etc.\n }\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e;\n\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eIlluminate\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eDatabase\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eSeeder\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBouncerSeeder\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eextends\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eSeeder\u003c/span\u003e\n{\n \u003cspan class=\"pl-k\"\u003epublic\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efunction\u003c/span\u003e \u003cspan class=\"pl-en\"\u003erun\u003c/span\u003e()\n {\n \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esuperadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eeverything\u003c/span\u003e();\n\n \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eeverything\u003c/span\u003e();\n \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eforbid\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoManage\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e::class);\n\n \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ecreate\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoOwn\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\n \u003cspan class=\"pl-c\"\u003e// etc.\u003c/span\u003e\n }\n}\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo actually run it, pass the seeder's class name to the \u003ccode\u003eclass\u003c/code\u003e option of the \u003ccode\u003edb:seed\u003c/code\u003e command:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"php artisan db:seed --class=BouncerSeeder\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ephp artisan db:seed --class=BouncerSeeder\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCan I use a different set of roles \u0026amp; abilities for the public \u0026amp; dashboard sections of my site, respectively?\u003c/h3\u003e\u003ca id=\"user-content-can-i-use-a-different-set-of-roles--abilities-for-the-public--dashboard-sections-of-my-site-respectively\" class=\"anchor\" aria-label=\"Permalink: Can I use a different set of roles \u0026amp; abilities for the public \u0026amp; dashboard sections of my site, respectively?\" href=\"#can-i-use-a-different-set-of-roles--abilities-for-the-public--dashboard-sections-of-my-site-respectively\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBouncer's \u003ca href=\"#the-scope-middleware\"\u003e\u003ccode\u003escope\u003c/code\u003e\u003c/a\u003e can be used to section off different parts of the site, creating a silo for each one of them with its own set of roles \u0026amp; abilities:\u003c/p\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eCreate a \u003ccode\u003eScopeBouncer\u003c/code\u003e \u003ca href=\"https://laravel.com/docs/11.x/middleware#defining-middleware\" rel=\"nofollow\"\u003emiddleware\u003c/a\u003e that takes an \u003ccode\u003e$identifier\u003c/code\u003e and sets it as the current scope:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Bouncer, Closure;\n\nclass ScopeBouncer\n{\n public function handle($request, Closure $next, $identifier)\n {\n Bouncer::scope()-\u0026gt;to($identifier);\n\n return $next($request);\n }\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003eClosure\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003eclass\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eScopeBouncer\u003c/span\u003e\n{\n \u003cspan class=\"pl-k\"\u003epublic\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efunction\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ehandle\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003erequest\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003e\u003cspan class=\"pl-smi\"\u003eClosure\u003c/span\u003e\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003enext\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eidentifier\u003c/span\u003e)\n {\n \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003escope\u003c/span\u003e()-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eidentifier\u003c/span\u003e);\n\n \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003enext\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003erequest\u003c/span\u003e);\n }\n}\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eRegister this new middleware as a route middleware in your \u003ca href=\"https://github.com/laravel/laravel/blob/73cff166c79cdeaef1c6b7ec6e71a33a7ea3012d/app/Http/Kernel.php#L53-L60\"\u003eHTTP Kernel class\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"protected $routeMiddleware = [\n // Keep the other route middleware, and add this:\n 'scope-bouncer' =\u0026gt; \\App\\Http\\Middleware\\ScopeBouncer::class,\n];\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eprotected\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003erouteMiddleware\u003c/span\u003e = [\n \u003cspan class=\"pl-c\"\u003e// Keep the other route middleware, and add this:\u003c/span\u003e\n \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003escope-bouncer\u003c/span\u003e'\u003c/span\u003e =\u0026gt; \\\u003cspan class=\"pl-v\"\u003eApp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eHttp\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eMiddleware\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eScopeBouncer\u003c/span\u003e::class,\n];\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eIn your \u003ca href=\"https://github.com/laravel/laravel/blob/73cff166c79cdeaef1c6b7ec6e71a33a7ea3012d/app/Providers/RouteServiceProvider.php\"\u003eroute service provider\u003c/a\u003e, apply this middleware with a different identifier for the public routes and the dashboard routes, respectively:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Route::middleware(['web', 'scope-bouncer:1'])\n -\u0026gt;namespace($this-\u0026gt;namespace)\n -\u0026gt;group(base_path('routes/public.php'));\n\nRoute::middleware(['web', 'scope-bouncer:2'])\n -\u0026gt;namespace($this-\u0026gt;namespace)\n -\u0026gt;group(base_path('routes/dashboard.php'));\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eRoute\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003emiddleware\u003c/span\u003e([\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eweb\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003escope-bouncer:1\u003c/span\u003e'\u003c/span\u003e])\n -\u0026gt;\u003cspan class=\"pl-en\"\u003enamespace\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003enamespace\u003c/span\u003e)\n -\u0026gt;\u003cspan class=\"pl-en\"\u003egroup\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003ebase_path\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eroutes/public.php\u003c/span\u003e'\u003c/span\u003e));\n\n\u003cspan class=\"pl-v\"\u003eRoute\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003emiddleware\u003c/span\u003e([\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eweb\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003escope-bouncer:2\u003c/span\u003e'\u003c/span\u003e])\n -\u0026gt;\u003cspan class=\"pl-en\"\u003enamespace\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003enamespace\u003c/span\u003e)\n -\u0026gt;\u003cspan class=\"pl-en\"\u003egroup\u003c/span\u003e(\u003cspan class=\"pl-en\"\u003ebase_path\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eroutes/dashboard.php\u003c/span\u003e'\u003c/span\u003e));\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp dir=\"auto\"\u003eThat's it. All roles and abilities will now be separately scoped for each section of your site. To fine-tune the extent of the scope, see \u003ca href=\"#customizing-bouncers-scope\"\u003eCustomizing Bouncer's scope\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eI'm trying to run the migration, but I'm getting a SQL error that the \"specified key was too long\"\u003c/h3\u003e\u003ca id=\"user-content-im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-the-specified-key-was-too-long\" class=\"anchor\" aria-label=\"Permalink: I'm trying to run the migration, but I'm getting a SQL error that the \u0026quot;specified key was too long\u0026quot;\" href=\"#im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-the-specified-key-was-too-long\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eStarting with Laravel 5.4, the default database character set is now \u003ccode\u003eutf8mb4\u003c/code\u003e. If you're using older versions of some databases (MySQL below 5.7.7, or MariaDB below 10.2.2) with Laravel 5.4+, you'll get a SQL error when trying to create an index on a string column. To fix this, change Laravel's default string length in your \u003ccode\u003eAppServiceProvider\u003c/code\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"use Illuminate\\Support\\Facades\\Schema;\n\npublic function boot()\n{\n Schema::defaultStringLength(191);\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003euse\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eIlluminate\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eSupport\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eFacades\u003c/span\u003e\\\u003cspan class=\"pl-v\"\u003eSchema\u003c/span\u003e;\n\n\u003cspan class=\"pl-k\"\u003epublic\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efunction\u003c/span\u003e \u003cspan class=\"pl-en\"\u003eboot\u003c/span\u003e()\n{\n \u003cspan class=\"pl-v\"\u003eSchema\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edefaultStringLength\u003c/span\u003e(\u003cspan class=\"pl-c1\"\u003e191\u003c/span\u003e);\n}\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can read more in \u003ca href=\"https://laravel-news.com/laravel-5-4-key-too-long-error\" rel=\"nofollow\"\u003ethis Laravel News article\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eI'm trying to run the migration, but I'm getting a SQL error that there is a \"Syntax error or access violation: 1064 ... to use near json not null)\"\u003c/h2\u003e\u003ca id=\"user-content-im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-there-is-a-syntax-error-or-access-violation-1064--to-use-near-json-not-null\" class=\"anchor\" aria-label=\"Permalink: I'm trying to run the migration, but I'm getting a SQL error that there is a \u0026quot;Syntax error or access violation: 1064 ... to use near json not null)\u0026quot;\" href=\"#im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-there-is-a-syntax-error-or-access-violation-1064--to-use-near-json-not-null\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eJSON columns are a relatively new addition to MySQL (5.7.8) and MariaDB (10.2.7). If you're using an older version of these databases, you cannot use JSON columns.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe best solution would be to upgrade your DB. If that's not currently possible, you can change \u003ca href=\"https://github.com/JosephSilber/bouncer/blob/2e31b84e9c1f6c2b86084df2af9d05299ba73c62/migrations/create_bouncer_tables.php#L25\"\u003eyour published migration file\u003c/a\u003e to use a \u003ccode\u003etext\u003c/code\u003e column instead:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-diff notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"- $table-\u0026gt;json('options')-\u0026gt;nullable();\n+ $table-\u0026gt;text('options')-\u0026gt;nullable();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-md\"\u003e\u003cspan class=\"pl-md\"\u003e-\u003c/span\u003e $table-\u0026gt;json('options')-\u0026gt;nullable();\u003c/span\u003e\n\u003cspan class=\"pl-mi1\"\u003e\u003cspan class=\"pl-mi1\"\u003e+\u003c/span\u003e $table-\u0026gt;text('options')-\u0026gt;nullable();\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eConsole commands\u003c/h2\u003e\u003ca id=\"user-content-console-commands\" class=\"anchor\" aria-label=\"Permalink: Console commands\" href=\"#console-commands\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003ebouncer:clean\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-bouncerclean\" class=\"anchor\" aria-label=\"Permalink: bouncer:clean\" href=\"#bouncerclean\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003ebouncer:clean\u003c/code\u003e command deletes unused abilities. Running this command will delete 2 types of unused abilities:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eUnassigned abilities\u003c/strong\u003e - abilities that are not assigned to anyone. For example:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow($user)-\u0026gt;to('view', Plan::class);\n\nBouncer::disallow($user)-\u0026gt;to('view', Plan::class);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eview\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePlan\u003c/span\u003e::class);\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eview\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePlan\u003c/span\u003e::class);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAt this point, the \"view plans\" ability is not assigned to anyone, so it'll get deleted.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote\u003c/strong\u003e: depending on the context of your app, you may not want to delete these. If you let your users manage abilities in your app's UI, you probably \u003cem\u003edon't\u003c/em\u003e want to delete unassigned abilities. See below.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eOrphaned abilities\u003c/strong\u003e - model abilities whose models have been deleted:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Bouncer::allow($user)-\u0026gt;to('delete', $plan);\n\n$plan-\u0026gt;delete();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eplan\u003c/span\u003e);\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eplan\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003edelete\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSince the plan no longer exists, the ability is no longer of any use, so it'll get deleted.\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003eIf you only want to delete one type of unused ability, run it with one of the following flags:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"php artisan bouncer:clean --unassigned\nphp artisan bouncer:clean --orphaned\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ephp artisan bouncer:clean --unassigned\nphp artisan bouncer:clean --orphaned\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIf you don't pass it any flags, it will delete both types of unused abilities.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTo automatically run this command periodically, add it to \u003ca href=\"https://laravel.com/docs/11.x/scheduling#defining-schedules\" rel=\"nofollow\"\u003eyour console kernel's schedule\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$schedule-\u0026gt;command('bouncer:clean')-\u0026gt;weekly();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eschedule\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003ecommand\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003ebouncer:clean\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eweekly\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCheat Sheet\u003c/h2\u003e\u003ca id=\"user-content-cheat-sheet\" class=\"anchor\" aria-label=\"Permalink: Cheat Sheet\" href=\"#cheat-sheet\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"// Adding abilities for users\nBouncer::allow($user)-\u0026gt;to('ban-users');\nBouncer::allow($user)-\u0026gt;to('edit', Post::class);\nBouncer::allow($user)-\u0026gt;to('delete', $post);\n\nBouncer::allow($user)-\u0026gt;everything();\nBouncer::allow($user)-\u0026gt;toManage(Post::class);\nBouncer::allow($user)-\u0026gt;toManage($post);\nBouncer::allow($user)-\u0026gt;to('view')-\u0026gt;everything();\n\nBouncer::allow($user)-\u0026gt;toOwn(Post::class);\nBouncer::allow($user)-\u0026gt;toOwnEverything();\n\n// Removing abilities uses the same syntax, e.g.\nBouncer::disallow($user)-\u0026gt;to('delete', $post);\nBouncer::disallow($user)-\u0026gt;toManage(Post::class);\nBouncer::disallow($user)-\u0026gt;toOwn(Post::class);\n\n// Adding \u0026amp; removing abilities for roles\nBouncer::allow('admin')-\u0026gt;to('ban-users');\nBouncer::disallow('admin')-\u0026gt;to('ban-users');\n\n// You can also forbid specific abilities with the same syntax...\nBouncer::forbid($user)-\u0026gt;to('delete', $post);\n\n// And also remove a forbidden ability with the same syntax...\nBouncer::unforbid($user)-\u0026gt;to('delete', $post);\n\n// Re-syncing a user's abilities\nBouncer::sync($user)-\u0026gt;abilities($abilities);\n\n// Assigning \u0026amp; retracting roles from users\nBouncer::assign('admin')-\u0026gt;to($user);\nBouncer::retract('admin')-\u0026gt;from($user);\n\n// Assigning roles to multiple users by ID\nBouncer::assign('admin')-\u0026gt;to([1, 2, 3]);\n\n// Re-syncing a user's roles\nBouncer::sync($user)-\u0026gt;roles($roles);\n\n// Checking the current user's abilities\n$boolean = Bouncer::can('ban-users');\n$boolean = Bouncer::can('edit', Post::class);\n$boolean = Bouncer::can('delete', $post);\n\n$boolean = Bouncer::cannot('ban-users');\n$boolean = Bouncer::cannot('edit', Post::class);\n$boolean = Bouncer::cannot('delete', $post);\n\n// Checking a user's roles\n$boolean = Bouncer::is($user)-\u0026gt;a('subscriber');\n$boolean = Bouncer::is($user)-\u0026gt;an('admin');\n$boolean = Bouncer::is($user)-\u0026gt;notA('subscriber');\n$boolean = Bouncer::is($user)-\u0026gt;notAn('admin');\n$boolean = Bouncer::is($user)-\u0026gt;a('moderator', 'editor');\n$boolean = Bouncer::is($user)-\u0026gt;all('moderator', 'editor');\n\nBouncer::cache();\nBouncer::dontCache();\n\nBouncer::refresh();\nBouncer::refreshFor($user);\"\u003e\u003cpre\u003e\u003cspan class=\"pl-c\"\u003e// Adding abilities for users\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eedit\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eeverything\u003c/span\u003e();\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoManage\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoManage\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eview\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eeverything\u003c/span\u003e();\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoOwn\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoOwnEverything\u003c/span\u003e();\n\n\u003cspan class=\"pl-c\"\u003e// Removing abilities uses the same syntax, e.g.\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoManage\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003etoOwn\u003c/span\u003e(\u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\n\u003cspan class=\"pl-c\"\u003e// Adding \u0026amp; removing abilities for roles\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// You can also forbid specific abilities with the same syntax...\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eforbid\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// And also remove a forbidden ability with the same syntax...\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eunforbid\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// Re-syncing a user's abilities\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003esync\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eabilities\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eabilities\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// Assigning \u0026amp; retracting roles from users\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eassign\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eretract\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003efrom\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// Assigning roles to multiple users by ID\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eassign\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eto\u003c/span\u003e([\u003cspan class=\"pl-c1\"\u003e1\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003e2\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003e3\u003c/span\u003e]);\n\n\u003cspan class=\"pl-c\"\u003e// Re-syncing a user's roles\u003c/span\u003e\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003esync\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eroles\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eroles\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// Checking the current user's abilities\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecan\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecan\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eedit\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecan\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecannot\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecannot\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eedit\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecannot\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// Checking a user's roles\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003ea\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esubscriber\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003ean\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003enotA\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esubscriber\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003enotAn\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003ea\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eis\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eall\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e);\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ecache\u003c/span\u003e();\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003edontCache\u003c/span\u003e();\n\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003erefresh\u003c/span\u003e();\n\u003cspan class=\"pl-v\"\u003eBouncer\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003erefreshFor\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e);\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSome of this functionality is also available directly on the user model:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-php notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$user-\u0026gt;allow('ban-users');\n$user-\u0026gt;allow('edit', Post::class);\n$user-\u0026gt;allow('delete', $post);\n\n$user-\u0026gt;disallow('ban-users');\n$user-\u0026gt;disallow('edit', Post::class);\n$user-\u0026gt;disallow('delete', $post);\n\n$user-\u0026gt;assign('admin');\n$user-\u0026gt;retract('admin');\n\n$boolean = $user-\u0026gt;isAn('admin');\n$boolean = $user-\u0026gt;isAn('editor', 'moderator');\n$boolean = $user-\u0026gt;isAll('moderator', 'editor');\n$boolean = $user-\u0026gt;isNotAn('admin', 'moderator');\n\n// Querying users by their roles\n$users = User::whereIs('superadmin')-\u0026gt;get();\n$users = User::whereIs('superadmin', 'admin')-\u0026gt;get();\n$users = User::whereIsAll('sales', 'marketing')-\u0026gt;get();\n\n$abilities = $user-\u0026gt;getAbilities();\n$forbidden = $user-\u0026gt;getForbiddenAbilities();\"\u003e\u003cpre\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eedit\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eban-users\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eedit\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-v\"\u003ePost\u003c/span\u003e::class);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003edisallow\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003edelete\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003epost\u003c/span\u003e);\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eassign\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eretract\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisAn\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisAn\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisAll\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eeditor\u003c/span\u003e'\u003c/span\u003e);\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eboolean\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003eisNotAn\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emoderator\u003c/span\u003e'\u003c/span\u003e);\n\n\u003cspan class=\"pl-c\"\u003e// Querying users by their roles\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eusers\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ewhereIs\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esuperadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eget\u003c/span\u003e();\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eusers\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ewhereIs\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esuperadmin\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003eadmin\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eget\u003c/span\u003e();\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eusers\u003c/span\u003e = \u003cspan class=\"pl-v\"\u003eUser\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003ewhereIsAll\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003esales\u003c/span\u003e'\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e'\u003cspan class=\"pl-s\"\u003emarketing\u003c/span\u003e'\u003c/span\u003e)-\u0026gt;\u003cspan class=\"pl-en\"\u003eget\u003c/span\u003e();\n\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eabilities\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003egetAbilities\u003c/span\u003e();\n\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eforbidden\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003euser\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-en\"\u003egetForbiddenAbilities\u003c/span\u003e();\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAlternative\u003c/h2\u003e\u003ca id=\"user-content-alternative\" class=\"anchor\" aria-label=\"Permalink: Alternative\" href=\"#alternative\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAmong the bajillion packages that \u003ca href=\"https://spatie.be\" rel=\"nofollow\"\u003eSpatie\u003c/a\u003e has so graciously bestowed upon the community, you'll find the excellent \u003ca href=\"https://github.com/spatie/laravel-permission\"\u003elaravel-permission\u003c/a\u003e package. Like Bouncer, it nicely integrates with Laravel's built-in gate and permission checks, but has a different set of design choices when it comes to syntax, DB structure \u0026amp; features.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eLicense\u003c/h2\u003e\u003ca id=\"user-content-license\" class=\"anchor\" aria-label=\"Permalink: License\" href=\"#license\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBouncer is open-sourced software licensed under the \u003ca href=\"http://opensource.org/licenses/MIT\" rel=\"nofollow\"\u003eMIT license\u003c/a\u003e\u003c/p\u003e\n\u003c/article\u003e","loaded":true,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Bouncer","anchor":"bouncer","htmlText":"Bouncer"},{"level":2,"text":"Table of Contents","anchor":"table-of-contents","htmlText":"Table of Contents"},{"level":2,"text":"Introduction","anchor":"introduction","htmlText":"Introduction"},{"level":2,"text":"Installation","anchor":"installation","htmlText":"Installation"},{"level":3,"text":"Installing Bouncer in a Laravel app","anchor":"installing-bouncer-in-a-laravel-app","htmlText":"Installing Bouncer in a Laravel app"},{"level":4,"text":"Facade","anchor":"facade","htmlText":"Facade"},{"level":3,"text":"Installing Bouncer in a non-Laravel app","anchor":"installing-bouncer-in-a-non-laravel-app","htmlText":"Installing Bouncer in a non-Laravel app"},{"level":3,"text":"Enabling cache","anchor":"enabling-cache","htmlText":"Enabling cache"},{"level":2,"text":"Usage","anchor":"usage","htmlText":"Usage"},{"level":3,"text":"Creating roles and abilities","anchor":"creating-roles-and-abilities","htmlText":"Creating roles and abilities"},{"level":3,"text":"Assigning roles to a user","anchor":"assigning-roles-to-a-user","htmlText":"Assigning roles to a user"},{"level":3,"text":"Giving a user an ability directly","anchor":"giving-a-user-an-ability-directly","htmlText":"Giving a user an ability directly"},{"level":3,"text":"Restricting an ability to a model","anchor":"restricting-an-ability-to-a-model","htmlText":"Restricting an ability to a model"},{"level":3,"text":"Allowing a user or role to \"own\" a model","anchor":"allowing-a-user-or-role-to-own-a-model","htmlText":"Allowing a user or role to \"own\" a model"},{"level":3,"text":"Retracting a role from a user","anchor":"retracting-a-role-from-a-user","htmlText":"Retracting a role from a user"},{"level":3,"text":"Removing an ability","anchor":"removing-an-ability","htmlText":"Removing an ability"},{"level":3,"text":"Forbidding an ability","anchor":"forbidding-an-ability","htmlText":"Forbidding an ability"},{"level":3,"text":"Unforbidding an ability","anchor":"unforbidding-an-ability","htmlText":"Unforbidding an ability"},{"level":3,"text":"Checking a user's roles","anchor":"checking-a-users-roles","htmlText":"Checking a user's roles"},{"level":3,"text":"Querying users by their roles","anchor":"querying-users-by-their-roles","htmlText":"Querying users by their roles"},{"level":3,"text":"Getting all roles for a user","anchor":"getting-all-roles-for-a-user","htmlText":"Getting all roles for a user"},{"level":3,"text":"Getting all abilities for a user","anchor":"getting-all-abilities-for-a-user","htmlText":"Getting all abilities for a user"},{"level":3,"text":"Authorizing users","anchor":"authorizing-users","htmlText":"Authorizing users"},{"level":3,"text":"Blade directives","anchor":"blade-directives","htmlText":"Blade directives"},{"level":3,"text":"Refreshing the cache","anchor":"refreshing-the-cache","htmlText":"Refreshing the cache"},{"level":2,"text":"Multi-tenancy","anchor":"multi-tenancy","htmlText":"Multi-tenancy"},{"level":3,"text":"The scope middleware","anchor":"the-scope-middleware","htmlText":"The scope middleware"},{"level":3,"text":"Customizing Bouncer's scope","anchor":"customizing-bouncers-scope","htmlText":"Customizing Bouncer's scope"},{"level":2,"text":"Configuration","anchor":"configuration","htmlText":"Configuration"},{"level":3,"text":"Cache","anchor":"cache","htmlText":"Cache"},{"level":3,"text":"Tables","anchor":"tables","htmlText":"Tables"},{"level":3,"text":"Custom models","anchor":"custom-models","htmlText":"Custom models"},{"level":3,"text":"User Model","anchor":"user-model","htmlText":"User Model"},{"level":3,"text":"Ownership","anchor":"ownership","htmlText":"Ownership"},{"level":2,"text":"FAQ","anchor":"faq","htmlText":"FAQ"},{"level":3,"text":"Where do I set up my app's roles and abilities?","anchor":"where-do-i-set-up-my-apps-roles-and-abilities","htmlText":"Where do I set up my app's roles and abilities?"},{"level":3,"text":"Can I use a different set of roles \u0026 abilities for the public \u0026 dashboard sections of my site, respectively?","anchor":"can-i-use-a-different-set-of-roles--abilities-for-the-public--dashboard-sections-of-my-site-respectively","htmlText":"Can I use a different set of roles \u0026amp; abilities for the public \u0026amp; dashboard sections of my site, respectively?"},{"level":3,"text":"I'm trying to run the migration, but I'm getting a SQL error that the \"specified key was too long\"","anchor":"im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-the-specified-key-was-too-long","htmlText":"I'm trying to run the migration, but I'm getting a SQL error that the \"specified key was too long\""},{"level":2,"text":"I'm trying to run the migration, but I'm getting a SQL error that there is a \"Syntax error or access violation: 1064 ... to use near json not null)\"","anchor":"im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-there-is-a-syntax-error-or-access-violation-1064--to-use-near-json-not-null","htmlText":"I'm trying to run the migration, but I'm getting a SQL error that there is a \"Syntax error or access violation: 1064 ... to use near json not null)\""},{"level":2,"text":"Console commands","anchor":"console-commands","htmlText":"Console commands"},{"level":3,"text":"bouncer:clean","anchor":"bouncerclean","htmlText":"bouncer:clean"},{"level":2,"text":"Cheat Sheet","anchor":"cheat-sheet","htmlText":"Cheat Sheet"},{"level":2,"text":"Alternative","anchor":"alternative","htmlText":"Alternative"},{"level":2,"text":"License","anchor":"license","htmlText":"License"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FJosephSilber%2Fbouncer"}},{"displayName":"LICENSE.txt","repoName":"bouncer","refName":"master","path":"LICENSE.txt","preferredFileType":"license","tabName":"MIT","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FJosephSilber%2Fbouncer"}}],"overviewFilesProcessingTime":0}},"appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-1583894afd38.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-67668e8c2caa.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"overview_shared_code_dropdown_button":false,"react_blob_overlay":false,"copilot_conversational_ux_embedding_update":false,"copilot_smell_icebreaker_ux":true,"copilot_workspace":false,"blob_edit_unsaved_changes_storage":true,"accessible_code_button":true}}}}</script> <div data-target="react-partial.reactRoot"><style data-styled="true" data-styled-version="5.3.11">.iVEunk{margin-top:16px;margin-bottom:16px;}/*!sc*/ .jzuOtQ{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}/*!sc*/ .bGojzy{margin-bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:16px;}/*!sc*/ .iNSVHo{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;padding-bottom:16px;padding-top:8px;}/*!sc*/ .bVgnfw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;gap:8px;}/*!sc*/ @media screen and (max-width:320px){.bVgnfw{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}}/*!sc*/ .CEgMp{position:relative;}/*!sc*/ @media screen and (max-width:380px){.CEgMp .ref-selector-button-text-container{max-width:80px;}}/*!sc*/ @media screen and (max-width:320px){.CEgMp{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}.CEgMp .overview-ref-selector{width:100%;}.CEgMp .overview-ref-selector > span{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;}.CEgMp .overview-ref-selector > span > span[data-component="text"]{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}}/*!sc*/ .gUkoLg{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}/*!sc*/ .bZBlpz{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;}/*!sc*/ .lhTYNA{margin-right:4px;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .ffLUq{font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}/*!sc*/ .hzSPyu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;pointer-events:none;}/*!sc*/ .fLXEGX{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (max-width:1079px){.fLXEGX{display:none;}}/*!sc*/ .dqfxud{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (min-width:1080px){.dqfxud{display:none;}}/*!sc*/ @media screen and (max-width:543px){.dqfxud{display:none;}}/*!sc*/ .jxTzTd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-left:8px;gap:8px;}/*!sc*/ .gqqBXN{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:8px;}/*!sc*/ @media screen and (max-width:543px){.gqqBXN{display:none;}}/*!sc*/ .dzXgxt{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (max-width:1011px){.dzXgxt{display:none;}}/*!sc*/ .iWFGlI{margin-left:8px;margin-right:8px;margin:0;}/*!sc*/ .YUPas{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (min-width:1012px){.YUPas{display:none;}}/*!sc*/ .izFOf{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}/*!sc*/ @media screen and (min-width:544px){.izFOf{display:none;}}/*!sc*/ .vIPPs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:16px;}/*!sc*/ .fdROMU{width:100%;border-collapse:separate;border-spacing:0;border:1px solid;border-color:var(--borderColor-default,var(--color-border-default,#d0d7de));border-radius:6px;table-layout:fixed;overflow:unset;}/*!sc*/ .jGKpsv{height:0px;line-height:0px;}/*!sc*/ .jGKpsv tr{height:0px;font-size:0px;}/*!sc*/ .jdgHnn{padding:16px;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));font-size:12px;text-align:left;height:40px;}/*!sc*/ .jdgHnn th{padding-left:16px;background-color:var(--bgColor-muted,var(--color-canvas-subtle,#f6f8fa));}/*!sc*/ .bQivRW{width:100%;border-top-left-radius:6px;}/*!sc*/ @media screen and (min-width:544px){.bQivRW{display:none;}}/*!sc*/ .ldkMIO{width:40%;border-top-left-radius:6px;}/*!sc*/ @media screen and (max-width:543px){.ldkMIO{display:none;}}/*!sc*/ .jMbWeI{text-align:right;padding-right:16px;width:136px;border-top-right-radius:6px;}/*!sc*/ .gpqjiB{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));font-size:12px;height:40px;}/*!sc*/ .dzCJzi{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;min-width:273px;padding:8px;}/*!sc*/ @media screen and (min-width:544px){.dzCJzi{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}}/*!sc*/ .eNCcrz{text-align:center;vertical-align:center;height:40px;border-top:1px solid;border-color:var(--borderColor-default,var(--color-border-default,#d0d7de));}/*!sc*/ .bHTcCe{border-top:1px solid var(--borderColor-default,var(--color-border-default));cursor:pointer;}/*!sc*/ .csrIcr{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;gap:16px;}/*!sc*/ .bUQNHB{border:1px solid;border-color:var(--borderColor-default,var(--color-border-default,#d0d7de));border-radius:6px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}/*!sc*/ @media screen and (max-width:543px){.bUQNHB{margin-left:-16px;margin-right:-16px;max-width:calc(100% + 32px);}}/*!sc*/ @media screen and (min-width:544px){.bUQNHB{max-width:100%;}}/*!sc*/ .jPdcfu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-bottom:1px solid;border-bottom-color:var(--borderColor-default,var(--color-border-default,#d0d7de));-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-right:8px;position:-webkit-sticky;position:sticky;top:0;background-color:var(--bgColor-default,var(--color-canvas-default,#ffffff));z-index:1;border-top-left-radius:6px;border-top-right-radius:6px;}/*!sc*/ .hUCRAk{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}/*!sc*/ .QkQOb{padding:32px;overflow:auto;}/*!sc*/ data-styled.g1[id="Box-sc-g0xbh4-0"]{content:"iVEunk,jzuOtQ,bGojzy,iNSVHo,bVgnfw,CEgMp,gUkoLg,bZBlpz,lhTYNA,ffLUq,hzSPyu,fLXEGX,dqfxud,jxTzTd,gqqBXN,dzXgxt,iWFGlI,YUPas,izFOf,vIPPs,fdROMU,jGKpsv,jdgHnn,bQivRW,ldkMIO,jMbWeI,gpqjiB,dzCJzi,eNCcrz,bHTcCe,csrIcr,bUQNHB,jPdcfu,hUCRAk,QkQOb,"}/*!sc*/ .eMMFM{min-width:0;}/*!sc*/ .eMMFM:where([data-size='small']){font-size:var(--text-body-size-small,0.75rem);line-height:var(--text-body-lineHeight-small,1.6666);}/*!sc*/ .eMMFM:where([data-size='medium']){font-size:var(--text-body-size-medium,0.875rem);line-height:var(--text-body-lineHeight-medium,1.4285);}/*!sc*/ .eMMFM:where([data-size='large']){font-size:var(--text-body-size-large,1rem);line-height:var(--text-body-lineHeight-large,1.5);}/*!sc*/ .eMMFM:where([data-weight='light']){font-weight:var(--base-text-weight-light,300);}/*!sc*/ .eMMFM:where([data-weight='normal']){font-weight:var(--base-text-weight-normal,400);}/*!sc*/ .eMMFM:where([data-weight='medium']){font-weight:var(--base-text-weight-medium,500);}/*!sc*/ .eMMFM:where([data-weight='semibold']){font-weight:var(--base-text-weight-semibold,600);}/*!sc*/ data-styled.g3[id="Text__StyledText-sc-17v1xeu-0"]{content:"eMMFM,"}/*!sc*/ .brGdpi{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;-webkit-clip:rect(0,0,0,0);clip:rect(0,0,0,0);white-space:nowrap;border-width:0;}/*!sc*/ data-styled.g4[id="_VisuallyHidden__VisuallyHidden-sc-11jhm7a-0"]{content:"brGdpi,"}/*!sc*/ .gwqFqs{font-size:14px;line-height:20px;color:var(--fgColor-default,var(--color-fg-default,#1F2328));vertical-align:middle;background-color:var(--bgColor-default,var(--color-canvas-default,#ffffff));border:1px solid var(--control-borderColor-rest,var(--borderColor-default,var(--color-border-default,#d0d7de)));border-radius:6px;outline:none;box-shadow:var(--shadow-inset,var(--color-primer-shadow-inset,inset 0 1px 0 rgba(208,215,222,0.2)));display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;min-height:32px;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:160px;}/*!sc*/ .gwqFqs input,.gwqFqs textarea{cursor:text;}/*!sc*/ .gwqFqs select{cursor:pointer;}/*!sc*/ .gwqFqs input::-webkit-input-placeholder,.gwqFqs textarea::-webkit-input-placeholder,.gwqFqs select::-webkit-input-placeholder{color:var(---control-fgColor-placeholder,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gwqFqs input::-moz-placeholder,.gwqFqs textarea::-moz-placeholder,.gwqFqs select::-moz-placeholder{color:var(---control-fgColor-placeholder,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gwqFqs input:-ms-input-placeholder,.gwqFqs textarea:-ms-input-placeholder,.gwqFqs select:-ms-input-placeholder{color:var(---control-fgColor-placeholder,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gwqFqs input::placeholder,.gwqFqs textarea::placeholder,.gwqFqs select::placeholder{color:var(---control-fgColor-placeholder,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gwqFqs:focus-within{border-color:var(--fgColor-accent,var(--color-accent-fg,#0969da));outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-1px;}/*!sc*/ .gwqFqs > textarea{padding:12px;}/*!sc*/ @media (min-width:768px){.gwqFqs{font-size:14px;}}/*!sc*/ data-styled.g9[id="TextInputWrapper__TextInputBaseWrapper-sc-1mqhpbi-0"]{content:"gwqFqs,"}/*!sc*/ .decvaq{background-repeat:no-repeat;background-position:right 8px center;padding-left:12px;padding-right:12px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:160px;}/*!sc*/ .decvaq > :not(:last-child){margin-right:8px;}/*!sc*/ .decvaq .TextInput-icon,.decvaq .TextInput-action{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}/*!sc*/ .decvaq > input,.decvaq > select{padding-left:0;padding-right:0;}/*!sc*/ data-styled.g10[id="TextInputWrapper-sc-1mqhpbi-1"]{content:"decvaq,"}/*!sc*/ .gVXRRg{border-radius:6px;border:1px solid;border-color:var(--button-default-borderColor-rest,var(--button-default-borderColor-rest,var(--color-btn-border,rgba(31,35,40,0.15))));font-family:inherit;font-weight:500;font-size:14px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-decoration:none;text-decoration:none;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;height:32px;padding:0 12px;gap:8px;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;-webkit-transition:80ms cubic-bezier(0.65,0,0.35,1);transition:80ms cubic-bezier(0.65,0,0.35,1);-webkit-transition-property:color,fill,background-color,border-color;transition-property:color,fill,background-color,border-color;color:var(--button-default-fgColor-rest,var(--color-btn-text,#24292f));background-color:var(--button-default-bgColor-rest,var(--color-btn-bg,#f6f8fa));box-shadow:var(--button-default-shadow-resting,var(--color-btn-shadow,0 1px 0 rgba(31,35,40,0.04))),var(--button-default-shadow-inset,var(--color-btn-inset-shadow,inset 0 1px 0 rgba(255,255,255,0.25)));}/*!sc*/ .gVXRRg:focus:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .gVXRRg:focus:not(:disabled):not(:focus-visible){outline:solid 1px transparent;}/*!sc*/ .gVXRRg:focus-visible:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .gVXRRg[href]{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}/*!sc*/ .gVXRRg[href]:hover{-webkit-text-decoration:none;text-decoration:none;}/*!sc*/ .gVXRRg:hover{-webkit-transition-duration:80ms;transition-duration:80ms;}/*!sc*/ .gVXRRg:active{-webkit-transition:none;transition:none;}/*!sc*/ .gVXRRg[data-inactive]{cursor:auto;}/*!sc*/ .gVXRRg:disabled{cursor:not-allowed;box-shadow:none;color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));border-color:var(--button-default-borderColor-disabled,var(--button-default-borderColor-rest,var(--color-btn-border,rgba(31,35,40,0.15))));background-color:var(--button-default-bgColor-disabled,var(--control-bgColor-disabled,var(--color-input-disabled-bg,rgba(175,184,193,0.2))));}/*!sc*/ .gVXRRg:disabled [data-component=ButtonCounter]{color:inherit;}/*!sc*/ @media (forced-colors:active){.gVXRRg:focus{outline:solid 1px transparent;}}/*!sc*/ .gVXRRg [data-component=ButtonCounter]{font-size:12px;background-color:var(--buttonCounter-default-bgColor-rest,var(--color-btn-counter-bg,rgba(31,35,40,0.08)));}/*!sc*/ .gVXRRg[data-component=IconButton]{display:inline-grid;padding:unset;place-content:center;width:32px;min-width:unset;}/*!sc*/ .gVXRRg[data-size="small"]{padding:0 8px;height:28px;gap:4px;font-size:12px;}/*!sc*/ .gVXRRg[data-size="small"] [data-component="text"]{line-height:1.6666667;}/*!sc*/ .gVXRRg[data-size="small"] [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .gVXRRg[data-size="small"] [data-component="buttonContent"] > :not(:last-child){margin-right:4px;}/*!sc*/ .gVXRRg[data-size="small"][data-component=IconButton]{width:28px;padding:unset;}/*!sc*/ .gVXRRg[data-size="large"]{padding:0 16px;height:40px;gap:8px;}/*!sc*/ .gVXRRg[data-size="large"] [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .gVXRRg[data-size="large"][data-component=IconButton]{width:40px;padding:unset;}/*!sc*/ .gVXRRg[data-block="block"]{width:100%;}/*!sc*/ .gVXRRg[data-label-wrap="true"]{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;height:unset;min-height:var(--control-medium-size,2rem);}/*!sc*/ .gVXRRg[data-label-wrap="true"] [data-component="buttonContent"]{-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;padding-block:calc(var(--control-medium-paddingBlock,0.375rem) - 2px);}/*!sc*/ .gVXRRg[data-label-wrap="true"] [data-component="text"]{white-space:unset;word-break:break-word;}/*!sc*/ .gVXRRg[data-label-wrap="true"][data-size="small"]{height:unset;min-height:var(--control-small-size,1.75rem);}/*!sc*/ .gVXRRg[data-label-wrap="true"][data-size="small"] [data-component="buttonContent"]{padding-block:calc(var(--control-small-paddingBlock,0.25rem) - 2px);}/*!sc*/ .gVXRRg[data-label-wrap="true"][data-size="large"]{height:unset;min-height:var(--control-large-size,2.5rem);padding-inline:var(--control-large-paddingInline-spacious,1rem);}/*!sc*/ .gVXRRg[data-label-wrap="true"][data-size="large"] [data-component="buttonContent"]{padding-block:calc(var(--control-large-paddingBlock,0.625rem) - 2px);}/*!sc*/ .gVXRRg[data-inactive]:not([disabled]){background-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));border-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));color:var(--button-inactive-fgColor,var(--button-inactive-fgColor-rest,var(--color-btn-inactive-text,#57606a)));}/*!sc*/ .gVXRRg[data-inactive]:not([disabled]):focus-visible{box-shadow:none;}/*!sc*/ .gVXRRg [data-component="leadingVisual"]{grid-area:leadingVisual;}/*!sc*/ .gVXRRg [data-component="text"]{grid-area:text;line-height:1.4285714;white-space:nowrap;}/*!sc*/ .gVXRRg [data-component="trailingVisual"]{grid-area:trailingVisual;}/*!sc*/ .gVXRRg [data-component="trailingAction"]{margin-right:-4px;}/*!sc*/ .gVXRRg [data-component="buttonContent"]{-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;display:grid;grid-template-areas:"leadingVisual text trailingVisual";grid-template-columns:min-content minmax(0,auto) min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}/*!sc*/ .gVXRRg [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .gVXRRg [data-component="loadingSpinner"]{grid-area:text;margin-right:0px !important;place-self:center;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .gVXRRg [data-component="loadingSpinner"] + [data-component="text"]{visibility:hidden;}/*!sc*/ .gVXRRg:hover:not([disabled]):not([data-inactive]){background-color:var(--button-default-bgColor-hover,var(--color-btn-hover-bg,#f3f4f6));border-color:var(--button-default-borderColor-hover,var(--button-default-borderColor-hover,var(--color-btn-hover-border,rgba(31,35,40,0.15))));}/*!sc*/ .gVXRRg:active:not([disabled]):not([data-inactive]){background-color:var(--button-default-bgColor-active,var(--color-btn-active-bg,hsla(220,14%,93%,1)));border-color:var(--button-default-borderColor-active,var(--button-default-borderColor-active,var(--color-btn-active-border,rgba(31,35,40,0.15))));}/*!sc*/ .gVXRRg[aria-expanded=true]{background-color:var(--button-default-bgColor-active,var(--color-btn-active-bg,hsla(220,14%,93%,1)));border-color:var(--button-default-borderColor-active,var(--button-default-borderColor-active,var(--color-btn-active-border,rgba(31,35,40,0.15))));}/*!sc*/ .gVXRRg [data-component="leadingVisual"],.gVXRRg [data-component="trailingVisual"],.gVXRRg [data-component="trailingAction"]{color:var(--button-color,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gVXRRg[data-component="IconButton"][data-no-visuals]:not(:disabled){color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .gVXRRg[data-size="medium"]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;}/*!sc*/ .gVXRRg[data-size="medium"] svg{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .gVXRRg[data-size="medium"] > span{width:inherit;}/*!sc*/ .loAzyw{border-radius:6px;border:1px solid;border-color:transparent;font-family:inherit;font-weight:500;font-size:14px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-decoration:none;text-decoration:none;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;height:32px;padding:0 12px;gap:8px;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;-webkit-transition:80ms cubic-bezier(0.65,0,0.35,1);transition:80ms cubic-bezier(0.65,0,0.35,1);-webkit-transition-property:color,fill,background-color,border-color;transition-property:color,fill,background-color,border-color;color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));background-color:transparent;box-shadow:none;}/*!sc*/ .loAzyw:focus:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .loAzyw:focus:not(:disabled):not(:focus-visible){outline:solid 1px transparent;}/*!sc*/ .loAzyw:focus-visible:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .loAzyw[href]{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}/*!sc*/ .loAzyw[href]:hover{-webkit-text-decoration:none;text-decoration:none;}/*!sc*/ .loAzyw:hover{-webkit-transition-duration:80ms;transition-duration:80ms;}/*!sc*/ .loAzyw:active{-webkit-transition:none;transition:none;}/*!sc*/ .loAzyw[data-inactive]{cursor:auto;}/*!sc*/ .loAzyw:disabled{cursor:not-allowed;box-shadow:none;color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));background-color:var(--button-invisible-bgColor-disabled,transparent);}/*!sc*/ .loAzyw:disabled [data-component=ButtonCounter],.loAzyw:disabled [data-component="leadingVisual"],.loAzyw:disabled [data-component="trailingAction"]{color:inherit;}/*!sc*/ @media (forced-colors:active){.loAzyw:focus{outline:solid 1px transparent;}}/*!sc*/ .loAzyw [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .loAzyw[data-component=IconButton]{display:inline-grid;padding:unset;place-content:center;width:32px;min-width:unset;}/*!sc*/ .loAzyw[data-size="small"]{padding:0 8px;height:28px;gap:4px;font-size:12px;}/*!sc*/ .loAzyw[data-size="small"] [data-component="text"]{line-height:1.6666667;}/*!sc*/ .loAzyw[data-size="small"] [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .loAzyw[data-size="small"] [data-component="buttonContent"] > :not(:last-child){margin-right:4px;}/*!sc*/ .loAzyw[data-size="small"][data-component=IconButton]{width:28px;padding:unset;}/*!sc*/ .loAzyw[data-size="large"]{padding:0 16px;height:40px;gap:8px;}/*!sc*/ .loAzyw[data-size="large"] [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .loAzyw[data-size="large"][data-component=IconButton]{width:40px;padding:unset;}/*!sc*/ .loAzyw[data-block="block"]{width:100%;}/*!sc*/ .loAzyw[data-label-wrap="true"]{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;height:unset;min-height:var(--control-medium-size,2rem);}/*!sc*/ .loAzyw[data-label-wrap="true"] [data-component="buttonContent"]{-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;padding-block:calc(var(--control-medium-paddingBlock,0.375rem) - 2px);}/*!sc*/ .loAzyw[data-label-wrap="true"] [data-component="text"]{white-space:unset;word-break:break-word;}/*!sc*/ .loAzyw[data-label-wrap="true"][data-size="small"]{height:unset;min-height:var(--control-small-size,1.75rem);}/*!sc*/ .loAzyw[data-label-wrap="true"][data-size="small"] [data-component="buttonContent"]{padding-block:calc(var(--control-small-paddingBlock,0.25rem) - 2px);}/*!sc*/ .loAzyw[data-label-wrap="true"][data-size="large"]{height:unset;min-height:var(--control-large-size,2.5rem);padding-inline:var(--control-large-paddingInline-spacious,1rem);}/*!sc*/ .loAzyw[data-label-wrap="true"][data-size="large"] [data-component="buttonContent"]{padding-block:calc(var(--control-large-paddingBlock,0.625rem) - 2px);}/*!sc*/ .loAzyw[data-inactive]:not([disabled]){background-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));border-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));color:var(--button-inactive-fgColor,var(--button-inactive-fgColor-rest,var(--color-btn-inactive-text,#57606a)));}/*!sc*/ .loAzyw[data-inactive]:not([disabled]):focus-visible{box-shadow:none;}/*!sc*/ .loAzyw [data-component="leadingVisual"]{grid-area:leadingVisual;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .loAzyw [data-component="text"]{grid-area:text;line-height:1.4285714;white-space:nowrap;}/*!sc*/ .loAzyw [data-component="trailingVisual"]{grid-area:trailingVisual;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .loAzyw [data-component="trailingAction"]{margin-right:-4px;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .loAzyw [data-component="buttonContent"]{-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;display:grid;grid-template-areas:"leadingVisual text trailingVisual";grid-template-columns:min-content minmax(0,auto) min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}/*!sc*/ .loAzyw [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .loAzyw [data-component="loadingSpinner"]{grid-area:text;margin-right:0px !important;place-self:center;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .loAzyw [data-component="loadingSpinner"] + [data-component="text"]{visibility:hidden;}/*!sc*/ .loAzyw:hover:not([disabled]){background-color:var(--control-transparent-bgColor-hover,var(--color-action-list-item-default-hover-bg,rgba(208,215,222,0.32)));}/*!sc*/ .loAzyw:active:not([disabled]){background-color:var(--control-transparent-bgColor-active,var(--color-action-list-item-default-active-bg,rgba(208,215,222,0.48)));}/*!sc*/ .loAzyw[aria-expanded=true]{background-color:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg,rgba(208,215,222,0.24)));}/*!sc*/ .loAzyw[data-component="IconButton"][data-no-visuals]{color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .loAzyw[data-no-visuals]{color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));}/*!sc*/ .loAzyw:has([data-component="ButtonCounter"]){color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));}/*!sc*/ .loAzyw:disabled[data-no-visuals]{color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));}/*!sc*/ .loAzyw:disabled[data-no-visuals] [data-component=ButtonCounter]{color:inherit;}/*!sc*/ .loAzyw[data-size="medium"]{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));padding-left:4px;padding-right:4px;}/*!sc*/ .loAzyw[data-size="medium"] span[data-component="leadingVisual"]{margin-right:4px !important;}/*!sc*/ .cXsOlJ{border-radius:6px;border:1px solid;border-color:transparent;font-family:inherit;font-weight:500;font-size:14px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-decoration:none;text-decoration:none;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;height:32px;padding:0 12px;gap:8px;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;-webkit-transition:80ms cubic-bezier(0.65,0,0.35,1);transition:80ms cubic-bezier(0.65,0,0.35,1);-webkit-transition-property:color,fill,background-color,border-color;transition-property:color,fill,background-color,border-color;color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));background-color:transparent;box-shadow:none;}/*!sc*/ .cXsOlJ:focus:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .cXsOlJ:focus:not(:disabled):not(:focus-visible){outline:solid 1px transparent;}/*!sc*/ .cXsOlJ:focus-visible:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .cXsOlJ[href]{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}/*!sc*/ .cXsOlJ[href]:hover{-webkit-text-decoration:none;text-decoration:none;}/*!sc*/ .cXsOlJ:hover{-webkit-transition-duration:80ms;transition-duration:80ms;}/*!sc*/ .cXsOlJ:active{-webkit-transition:none;transition:none;}/*!sc*/ .cXsOlJ[data-inactive]{cursor:auto;}/*!sc*/ .cXsOlJ:disabled{cursor:not-allowed;box-shadow:none;color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));background-color:var(--button-invisible-bgColor-disabled,transparent);}/*!sc*/ .cXsOlJ:disabled [data-component=ButtonCounter],.cXsOlJ:disabled [data-component="leadingVisual"],.cXsOlJ:disabled [data-component="trailingAction"]{color:inherit;}/*!sc*/ @media (forced-colors:active){.cXsOlJ:focus{outline:solid 1px transparent;}}/*!sc*/ .cXsOlJ [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .cXsOlJ[data-component=IconButton]{display:inline-grid;padding:unset;place-content:center;width:32px;min-width:unset;}/*!sc*/ .cXsOlJ[data-size="small"]{padding:0 8px;height:28px;gap:4px;font-size:12px;}/*!sc*/ .cXsOlJ[data-size="small"] [data-component="text"]{line-height:1.6666667;}/*!sc*/ .cXsOlJ[data-size="small"] [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .cXsOlJ[data-size="small"] [data-component="buttonContent"] > :not(:last-child){margin-right:4px;}/*!sc*/ .cXsOlJ[data-size="small"][data-component=IconButton]{width:28px;padding:unset;}/*!sc*/ .cXsOlJ[data-size="large"]{padding:0 16px;height:40px;gap:8px;}/*!sc*/ .cXsOlJ[data-size="large"] [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .cXsOlJ[data-size="large"][data-component=IconButton]{width:40px;padding:unset;}/*!sc*/ .cXsOlJ[data-block="block"]{width:100%;}/*!sc*/ .cXsOlJ[data-label-wrap="true"]{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;height:unset;min-height:var(--control-medium-size,2rem);}/*!sc*/ .cXsOlJ[data-label-wrap="true"] [data-component="buttonContent"]{-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;padding-block:calc(var(--control-medium-paddingBlock,0.375rem) - 2px);}/*!sc*/ .cXsOlJ[data-label-wrap="true"] [data-component="text"]{white-space:unset;word-break:break-word;}/*!sc*/ .cXsOlJ[data-label-wrap="true"][data-size="small"]{height:unset;min-height:var(--control-small-size,1.75rem);}/*!sc*/ .cXsOlJ[data-label-wrap="true"][data-size="small"] [data-component="buttonContent"]{padding-block:calc(var(--control-small-paddingBlock,0.25rem) - 2px);}/*!sc*/ .cXsOlJ[data-label-wrap="true"][data-size="large"]{height:unset;min-height:var(--control-large-size,2.5rem);padding-inline:var(--control-large-paddingInline-spacious,1rem);}/*!sc*/ .cXsOlJ[data-label-wrap="true"][data-size="large"] [data-component="buttonContent"]{padding-block:calc(var(--control-large-paddingBlock,0.625rem) - 2px);}/*!sc*/ .cXsOlJ[data-inactive]:not([disabled]){background-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));border-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));color:var(--button-inactive-fgColor,var(--button-inactive-fgColor-rest,var(--color-btn-inactive-text,#57606a)));}/*!sc*/ .cXsOlJ[data-inactive]:not([disabled]):focus-visible{box-shadow:none;}/*!sc*/ .cXsOlJ [data-component="leadingVisual"]{grid-area:leadingVisual;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .cXsOlJ [data-component="text"]{grid-area:text;line-height:1.4285714;white-space:nowrap;}/*!sc*/ .cXsOlJ [data-component="trailingVisual"]{grid-area:trailingVisual;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .cXsOlJ [data-component="trailingAction"]{margin-right:-4px;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .cXsOlJ [data-component="buttonContent"]{-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;display:grid;grid-template-areas:"leadingVisual text trailingVisual";grid-template-columns:min-content minmax(0,auto) min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}/*!sc*/ .cXsOlJ [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .cXsOlJ [data-component="loadingSpinner"]{grid-area:text;margin-right:0px !important;place-self:center;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .cXsOlJ [data-component="loadingSpinner"] + [data-component="text"]{visibility:hidden;}/*!sc*/ .cXsOlJ:hover:not([disabled]){background-color:var(--control-transparent-bgColor-hover,var(--color-action-list-item-default-hover-bg,rgba(208,215,222,0.32)));}/*!sc*/ .cXsOlJ:active:not([disabled]){background-color:var(--control-transparent-bgColor-active,var(--color-action-list-item-default-active-bg,rgba(208,215,222,0.48)));}/*!sc*/ .cXsOlJ[aria-expanded=true]{background-color:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg,rgba(208,215,222,0.24)));}/*!sc*/ .cXsOlJ[data-component="IconButton"][data-no-visuals]{color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .cXsOlJ[data-no-visuals]{color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));}/*!sc*/ .cXsOlJ:has([data-component="ButtonCounter"]){color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));}/*!sc*/ .cXsOlJ:disabled[data-no-visuals]{color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));}/*!sc*/ .cXsOlJ:disabled[data-no-visuals] [data-component=ButtonCounter]{color:inherit;}/*!sc*/ .cXsOlJ[data-size="medium"][data-no-visuals]{color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .gGdPyq{border-radius:6px;border:1px solid;border-color:var(--button-default-borderColor-rest,var(--button-default-borderColor-rest,var(--color-btn-border,rgba(31,35,40,0.15))));font-family:inherit;font-weight:500;font-size:14px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-decoration:none;text-decoration:none;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;height:32px;padding:0 12px;gap:8px;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;-webkit-transition:80ms cubic-bezier(0.65,0,0.35,1);transition:80ms cubic-bezier(0.65,0,0.35,1);-webkit-transition-property:color,fill,background-color,border-color;transition-property:color,fill,background-color,border-color;color:var(--button-default-fgColor-rest,var(--color-btn-text,#24292f));background-color:var(--button-default-bgColor-rest,var(--color-btn-bg,#f6f8fa));box-shadow:var(--button-default-shadow-resting,var(--color-btn-shadow,0 1px 0 rgba(31,35,40,0.04))),var(--button-default-shadow-inset,var(--color-btn-inset-shadow,inset 0 1px 0 rgba(255,255,255,0.25)));}/*!sc*/ .gGdPyq:focus:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .gGdPyq:focus:not(:disabled):not(:focus-visible){outline:solid 1px transparent;}/*!sc*/ .gGdPyq:focus-visible:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .gGdPyq[href]{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}/*!sc*/ .gGdPyq[href]:hover{-webkit-text-decoration:none;text-decoration:none;}/*!sc*/ .gGdPyq:hover{-webkit-transition-duration:80ms;transition-duration:80ms;}/*!sc*/ .gGdPyq:active{-webkit-transition:none;transition:none;}/*!sc*/ .gGdPyq[data-inactive]{cursor:auto;}/*!sc*/ .gGdPyq:disabled{cursor:not-allowed;box-shadow:none;color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));border-color:var(--button-default-borderColor-disabled,var(--button-default-borderColor-rest,var(--color-btn-border,rgba(31,35,40,0.15))));background-color:var(--button-default-bgColor-disabled,var(--control-bgColor-disabled,var(--color-input-disabled-bg,rgba(175,184,193,0.2))));}/*!sc*/ .gGdPyq:disabled [data-component=ButtonCounter]{color:inherit;}/*!sc*/ @media (forced-colors:active){.gGdPyq:focus{outline:solid 1px transparent;}}/*!sc*/ .gGdPyq [data-component=ButtonCounter]{font-size:12px;background-color:var(--buttonCounter-default-bgColor-rest,var(--color-btn-counter-bg,rgba(31,35,40,0.08)));}/*!sc*/ .gGdPyq[data-component=IconButton]{display:inline-grid;padding:unset;place-content:center;width:32px;min-width:unset;}/*!sc*/ .gGdPyq[data-size="small"]{padding:0 8px;height:28px;gap:4px;font-size:12px;}/*!sc*/ .gGdPyq[data-size="small"] [data-component="text"]{line-height:1.6666667;}/*!sc*/ .gGdPyq[data-size="small"] [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .gGdPyq[data-size="small"] [data-component="buttonContent"] > :not(:last-child){margin-right:4px;}/*!sc*/ .gGdPyq[data-size="small"][data-component=IconButton]{width:28px;padding:unset;}/*!sc*/ .gGdPyq[data-size="large"]{padding:0 16px;height:40px;gap:8px;}/*!sc*/ .gGdPyq[data-size="large"] [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .gGdPyq[data-size="large"][data-component=IconButton]{width:40px;padding:unset;}/*!sc*/ .gGdPyq[data-block="block"]{width:100%;}/*!sc*/ .gGdPyq[data-label-wrap="true"]{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;height:unset;min-height:var(--control-medium-size,2rem);}/*!sc*/ .gGdPyq[data-label-wrap="true"] [data-component="buttonContent"]{-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;padding-block:calc(var(--control-medium-paddingBlock,0.375rem) - 2px);}/*!sc*/ .gGdPyq[data-label-wrap="true"] [data-component="text"]{white-space:unset;word-break:break-word;}/*!sc*/ .gGdPyq[data-label-wrap="true"][data-size="small"]{height:unset;min-height:var(--control-small-size,1.75rem);}/*!sc*/ .gGdPyq[data-label-wrap="true"][data-size="small"] [data-component="buttonContent"]{padding-block:calc(var(--control-small-paddingBlock,0.25rem) - 2px);}/*!sc*/ .gGdPyq[data-label-wrap="true"][data-size="large"]{height:unset;min-height:var(--control-large-size,2.5rem);padding-inline:var(--control-large-paddingInline-spacious,1rem);}/*!sc*/ .gGdPyq[data-label-wrap="true"][data-size="large"] [data-component="buttonContent"]{padding-block:calc(var(--control-large-paddingBlock,0.625rem) - 2px);}/*!sc*/ .gGdPyq[data-inactive]:not([disabled]){background-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));border-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));color:var(--button-inactive-fgColor,var(--button-inactive-fgColor-rest,var(--color-btn-inactive-text,#57606a)));}/*!sc*/ .gGdPyq[data-inactive]:not([disabled]):focus-visible{box-shadow:none;}/*!sc*/ .gGdPyq [data-component="leadingVisual"]{grid-area:leadingVisual;}/*!sc*/ .gGdPyq [data-component="text"]{grid-area:text;line-height:1.4285714;white-space:nowrap;}/*!sc*/ .gGdPyq [data-component="trailingVisual"]{grid-area:trailingVisual;}/*!sc*/ .gGdPyq [data-component="trailingAction"]{margin-right:-4px;}/*!sc*/ .gGdPyq [data-component="buttonContent"]{-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;display:grid;grid-template-areas:"leadingVisual text trailingVisual";grid-template-columns:min-content minmax(0,auto) min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}/*!sc*/ .gGdPyq [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .gGdPyq [data-component="loadingSpinner"]{grid-area:text;margin-right:0px !important;place-self:center;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .gGdPyq [data-component="loadingSpinner"] + [data-component="text"]{visibility:hidden;}/*!sc*/ .gGdPyq:hover:not([disabled]):not([data-inactive]){background-color:var(--button-default-bgColor-hover,var(--color-btn-hover-bg,#f3f4f6));border-color:var(--button-default-borderColor-hover,var(--button-default-borderColor-hover,var(--color-btn-hover-border,rgba(31,35,40,0.15))));}/*!sc*/ .gGdPyq:active:not([disabled]):not([data-inactive]){background-color:var(--button-default-bgColor-active,var(--color-btn-active-bg,hsla(220,14%,93%,1)));border-color:var(--button-default-borderColor-active,var(--button-default-borderColor-active,var(--color-btn-active-border,rgba(31,35,40,0.15))));}/*!sc*/ .gGdPyq[aria-expanded=true]{background-color:var(--button-default-bgColor-active,var(--color-btn-active-bg,hsla(220,14%,93%,1)));border-color:var(--button-default-borderColor-active,var(--button-default-borderColor-active,var(--color-btn-active-border,rgba(31,35,40,0.15))));}/*!sc*/ .gGdPyq [data-component="leadingVisual"],.gGdPyq [data-component="trailingVisual"],.gGdPyq [data-component="trailingAction"]{color:var(--button-color,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gGdPyq[data-component="IconButton"][data-no-visuals]:not(:disabled){color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .bmlmSe{border-radius:6px;border:1px solid;border-color:var(--button-primary-borderColor-rest,var(--color-btn-primary-border,rgba(31,35,40,0.15)));font-family:inherit;font-weight:500;font-size:14px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-decoration:none;text-decoration:none;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;height:32px;padding:0 12px;gap:8px;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;-webkit-transition:80ms cubic-bezier(0.65,0,0.35,1);transition:80ms cubic-bezier(0.65,0,0.35,1);-webkit-transition-property:color,fill,background-color,border-color;transition-property:color,fill,background-color,border-color;color:var(--button-primary-fgColor-rest,var(--color-btn-primary-text,#ffffff));background-color:var(--button-primary-bgColor-rest,var(--color-btn-primary-bg,#1f883d));box-shadow:var(--shadow-resting-small,var(--color-btn-primary-shadow,0 1px 0 rgba(31,35,40,0.1)));}/*!sc*/ .bmlmSe:focus:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .bmlmSe:focus:not(:disabled):not(:focus-visible){outline:solid 1px transparent;}/*!sc*/ .bmlmSe:focus-visible:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .bmlmSe[href]{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}/*!sc*/ .bmlmSe[href]:hover{-webkit-text-decoration:none;text-decoration:none;}/*!sc*/ .bmlmSe:hover{-webkit-transition-duration:80ms;transition-duration:80ms;}/*!sc*/ .bmlmSe:active{-webkit-transition:none;transition:none;}/*!sc*/ .bmlmSe[data-inactive]{cursor:auto;}/*!sc*/ .bmlmSe:disabled{cursor:not-allowed;box-shadow:none;color:var(--button-primary-fgColor-disabled,var(--color-btn-primary-disabled-text,rgba(255,255,255,0.8)));background-color:var(--button-primary-bgColor-disabled,var(--color-btn-primary-disabled-bg,#94d3a2));border-color:var(--button-primary-borderColor-disabled,var(--color-btn-primary-disabled-border,rgba(31,35,40,0.15)));}/*!sc*/ .bmlmSe:disabled [data-component=ButtonCounter]{color:inherit;}/*!sc*/ @media (forced-colors:active){.bmlmSe:focus{outline:solid 1px transparent;}}/*!sc*/ .bmlmSe [data-component=ButtonCounter]{font-size:12px;background-color:var(--buttonCounter-primary-bgColor-rest,var(--color-btn-primary-counter-bg,rgba(0,45,17,0.2)));color:var(--button-primary-fgColor-rest,var(--color-btn-primary-text,#ffffff));}/*!sc*/ .bmlmSe[data-component=IconButton]{display:inline-grid;padding:unset;place-content:center;width:32px;min-width:unset;}/*!sc*/ .bmlmSe[data-size="small"]{padding:0 8px;height:28px;gap:4px;font-size:12px;}/*!sc*/ .bmlmSe[data-size="small"] [data-component="text"]{line-height:1.6666667;}/*!sc*/ .bmlmSe[data-size="small"] [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .bmlmSe[data-size="small"] [data-component="buttonContent"] > :not(:last-child){margin-right:4px;}/*!sc*/ .bmlmSe[data-size="small"][data-component=IconButton]{width:28px;padding:unset;}/*!sc*/ .bmlmSe[data-size="large"]{padding:0 16px;height:40px;gap:8px;}/*!sc*/ .bmlmSe[data-size="large"] [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .bmlmSe[data-size="large"][data-component=IconButton]{width:40px;padding:unset;}/*!sc*/ .bmlmSe[data-block="block"]{width:100%;}/*!sc*/ .bmlmSe[data-label-wrap="true"]{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;height:unset;min-height:var(--control-medium-size,2rem);}/*!sc*/ .bmlmSe[data-label-wrap="true"] [data-component="buttonContent"]{-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;padding-block:calc(var(--control-medium-paddingBlock,0.375rem) - 2px);}/*!sc*/ .bmlmSe[data-label-wrap="true"] [data-component="text"]{white-space:unset;word-break:break-word;}/*!sc*/ .bmlmSe[data-label-wrap="true"][data-size="small"]{height:unset;min-height:var(--control-small-size,1.75rem);}/*!sc*/ .bmlmSe[data-label-wrap="true"][data-size="small"] [data-component="buttonContent"]{padding-block:calc(var(--control-small-paddingBlock,0.25rem) - 2px);}/*!sc*/ .bmlmSe[data-label-wrap="true"][data-size="large"]{height:unset;min-height:var(--control-large-size,2.5rem);padding-inline:var(--control-large-paddingInline-spacious,1rem);}/*!sc*/ .bmlmSe[data-label-wrap="true"][data-size="large"] [data-component="buttonContent"]{padding-block:calc(var(--control-large-paddingBlock,0.625rem) - 2px);}/*!sc*/ .bmlmSe[data-inactive]:not([disabled]){background-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));border-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));color:var(--button-inactive-fgColor,var(--button-inactive-fgColor-rest,var(--color-btn-inactive-text,#57606a)));}/*!sc*/ .bmlmSe[data-inactive]:not([disabled]):focus-visible{box-shadow:none;}/*!sc*/ .bmlmSe [data-component="leadingVisual"]{grid-area:leadingVisual;}/*!sc*/ .bmlmSe [data-component="text"]{grid-area:text;line-height:1.4285714;white-space:nowrap;}/*!sc*/ .bmlmSe [data-component="trailingVisual"]{grid-area:trailingVisual;}/*!sc*/ .bmlmSe [data-component="trailingAction"]{margin-right:-4px;}/*!sc*/ .bmlmSe [data-component="buttonContent"]{-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;display:grid;grid-template-areas:"leadingVisual text trailingVisual";grid-template-columns:min-content minmax(0,auto) min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}/*!sc*/ .bmlmSe [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .bmlmSe [data-component="loadingSpinner"]{grid-area:text;margin-right:0px !important;place-self:center;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .bmlmSe [data-component="loadingSpinner"] + [data-component="text"]{visibility:hidden;}/*!sc*/ .bmlmSe:hover:not([disabled]):not([data-inactive]){color:btn.primary.hoverText;background-color:var(--button-primary-bgColor-hover,var(--color-btn-primary-hover-bg,#1a7f37));}/*!sc*/ .bmlmSe:focus:not([disabled]){box-shadow:inset 0 0 0 3px;}/*!sc*/ .bmlmSe:focus-visible:not([disabled]){box-shadow:inset 0 0 0 3px;}/*!sc*/ .bmlmSe:active:not([disabled]):not([data-inactive]){background-color:var(--button-primary-bgColor-active,var(--color-btn-primary-selected-bg,hsla(137,66%,28%,1)));box-shadow:var(--button-primary-shadow-selected,var(--color-btn-primary-selected-shadow,inset 0 1px 0 rgba(0,45,17,0.2)));}/*!sc*/ .bmlmSe[aria-expanded=true]{background-color:var(--button-primary-bgColor-active,var(--color-btn-primary-selected-bg,hsla(137,66%,28%,1)));box-shadow:var(--button-primary-shadow-selected,var(--color-btn-primary-selected-shadow,inset 0 1px 0 rgba(0,45,17,0.2)));}/*!sc*/ .dPmZyJ{border-radius:6px;border:1px solid;border-color:transparent;font-family:inherit;font-weight:500;font-size:14px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-decoration:none;text-decoration:none;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;height:32px;padding:0 12px;gap:8px;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;-webkit-transition:80ms cubic-bezier(0.65,0,0.35,1);transition:80ms cubic-bezier(0.65,0,0.35,1);-webkit-transition-property:color,fill,background-color,border-color;transition-property:color,fill,background-color,border-color;color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));background-color:transparent;box-shadow:none;}/*!sc*/ .dPmZyJ:focus:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .dPmZyJ:focus:not(:disabled):not(:focus-visible){outline:solid 1px transparent;}/*!sc*/ .dPmZyJ:focus-visible:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .dPmZyJ[href]{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}/*!sc*/ .dPmZyJ[href]:hover{-webkit-text-decoration:none;text-decoration:none;}/*!sc*/ .dPmZyJ:hover{-webkit-transition-duration:80ms;transition-duration:80ms;}/*!sc*/ .dPmZyJ:active{-webkit-transition:none;transition:none;}/*!sc*/ .dPmZyJ[data-inactive]{cursor:auto;}/*!sc*/ .dPmZyJ:disabled{cursor:not-allowed;box-shadow:none;color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));background-color:var(--button-invisible-bgColor-disabled,transparent);}/*!sc*/ .dPmZyJ:disabled [data-component=ButtonCounter],.dPmZyJ:disabled [data-component="leadingVisual"],.dPmZyJ:disabled [data-component="trailingAction"]{color:inherit;}/*!sc*/ @media (forced-colors:active){.dPmZyJ:focus{outline:solid 1px transparent;}}/*!sc*/ .dPmZyJ [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .dPmZyJ[data-component=IconButton]{display:inline-grid;padding:unset;place-content:center;width:32px;min-width:unset;}/*!sc*/ .dPmZyJ[data-size="small"]{padding:0 8px;height:28px;gap:4px;font-size:12px;}/*!sc*/ .dPmZyJ[data-size="small"] [data-component="text"]{line-height:1.6666667;}/*!sc*/ .dPmZyJ[data-size="small"] [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .dPmZyJ[data-size="small"] [data-component="buttonContent"] > :not(:last-child){margin-right:4px;}/*!sc*/ .dPmZyJ[data-size="small"][data-component=IconButton]{width:28px;padding:unset;}/*!sc*/ .dPmZyJ[data-size="large"]{padding:0 16px;height:40px;gap:8px;}/*!sc*/ .dPmZyJ[data-size="large"] [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .dPmZyJ[data-size="large"][data-component=IconButton]{width:40px;padding:unset;}/*!sc*/ .dPmZyJ[data-block="block"]{width:100%;}/*!sc*/ .dPmZyJ[data-label-wrap="true"]{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;height:unset;min-height:var(--control-medium-size,2rem);}/*!sc*/ .dPmZyJ[data-label-wrap="true"] [data-component="buttonContent"]{-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;padding-block:calc(var(--control-medium-paddingBlock,0.375rem) - 2px);}/*!sc*/ .dPmZyJ[data-label-wrap="true"] [data-component="text"]{white-space:unset;word-break:break-word;}/*!sc*/ .dPmZyJ[data-label-wrap="true"][data-size="small"]{height:unset;min-height:var(--control-small-size,1.75rem);}/*!sc*/ .dPmZyJ[data-label-wrap="true"][data-size="small"] [data-component="buttonContent"]{padding-block:calc(var(--control-small-paddingBlock,0.25rem) - 2px);}/*!sc*/ .dPmZyJ[data-label-wrap="true"][data-size="large"]{height:unset;min-height:var(--control-large-size,2.5rem);padding-inline:var(--control-large-paddingInline-spacious,1rem);}/*!sc*/ .dPmZyJ[data-label-wrap="true"][data-size="large"] [data-component="buttonContent"]{padding-block:calc(var(--control-large-paddingBlock,0.625rem) - 2px);}/*!sc*/ .dPmZyJ[data-inactive]:not([disabled]){background-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));border-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));color:var(--button-inactive-fgColor,var(--button-inactive-fgColor-rest,var(--color-btn-inactive-text,#57606a)));}/*!sc*/ .dPmZyJ[data-inactive]:not([disabled]):focus-visible{box-shadow:none;}/*!sc*/ .dPmZyJ [data-component="leadingVisual"]{grid-area:leadingVisual;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .dPmZyJ [data-component="text"]{grid-area:text;line-height:1.4285714;white-space:nowrap;}/*!sc*/ .dPmZyJ [data-component="trailingVisual"]{grid-area:trailingVisual;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .dPmZyJ [data-component="trailingAction"]{margin-right:-4px;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .dPmZyJ [data-component="buttonContent"]{-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;display:grid;grid-template-areas:"leadingVisual text trailingVisual";grid-template-columns:min-content minmax(0,auto) min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}/*!sc*/ .dPmZyJ [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .dPmZyJ [data-component="loadingSpinner"]{grid-area:text;margin-right:0px !important;place-self:center;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .dPmZyJ [data-component="loadingSpinner"] + [data-component="text"]{visibility:hidden;}/*!sc*/ .dPmZyJ:hover:not([disabled]){background-color:var(--control-transparent-bgColor-hover,var(--color-action-list-item-default-hover-bg,rgba(208,215,222,0.32)));}/*!sc*/ .dPmZyJ:active:not([disabled]){background-color:var(--control-transparent-bgColor-active,var(--color-action-list-item-default-active-bg,rgba(208,215,222,0.48)));}/*!sc*/ .dPmZyJ[aria-expanded=true]{background-color:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg,rgba(208,215,222,0.24)));}/*!sc*/ .dPmZyJ[data-component="IconButton"][data-no-visuals]{color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .dPmZyJ[data-no-visuals]{color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));}/*!sc*/ .dPmZyJ:has([data-component="ButtonCounter"]){color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));}/*!sc*/ .dPmZyJ:disabled[data-no-visuals]{color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));}/*!sc*/ .dPmZyJ:disabled[data-no-visuals] [data-component=ButtonCounter]{color:inherit;}/*!sc*/ .gXPTqA{border-radius:6px;border:1px solid;border-color:transparent;font-family:inherit;font-weight:500;font-size:14px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-decoration:none;text-decoration:none;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;height:32px;padding:0 12px;gap:8px;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;-webkit-transition:80ms cubic-bezier(0.65,0,0.35,1);transition:80ms cubic-bezier(0.65,0,0.35,1);-webkit-transition-property:color,fill,background-color,border-color;transition-property:color,fill,background-color,border-color;color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));background-color:transparent;box-shadow:none;}/*!sc*/ .gXPTqA:focus:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .gXPTqA:focus:not(:disabled):not(:focus-visible){outline:solid 1px transparent;}/*!sc*/ .gXPTqA:focus-visible:not(:disabled){box-shadow:none;outline:2px solid var(--fgColor-accent,var(--color-accent-fg,#0969da));outline-offset:-2px;}/*!sc*/ .gXPTqA[href]{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}/*!sc*/ .gXPTqA[href]:hover{-webkit-text-decoration:none;text-decoration:none;}/*!sc*/ .gXPTqA:hover{-webkit-transition-duration:80ms;transition-duration:80ms;}/*!sc*/ .gXPTqA:active{-webkit-transition:none;transition:none;}/*!sc*/ .gXPTqA[data-inactive]{cursor:auto;}/*!sc*/ .gXPTqA:disabled{cursor:not-allowed;box-shadow:none;color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));background-color:var(--button-invisible-bgColor-disabled,transparent);}/*!sc*/ .gXPTqA:disabled [data-component=ButtonCounter],.gXPTqA:disabled [data-component="leadingVisual"],.gXPTqA:disabled [data-component="trailingAction"]{color:inherit;}/*!sc*/ @media (forced-colors:active){.gXPTqA:focus{outline:solid 1px transparent;}}/*!sc*/ .gXPTqA [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .gXPTqA[data-component=IconButton]{display:inline-grid;padding:unset;place-content:center;width:32px;min-width:unset;}/*!sc*/ .gXPTqA[data-size="small"]{padding:0 8px;height:28px;gap:4px;font-size:12px;}/*!sc*/ .gXPTqA[data-size="small"] [data-component="text"]{line-height:1.6666667;}/*!sc*/ .gXPTqA[data-size="small"] [data-component=ButtonCounter]{font-size:12px;}/*!sc*/ .gXPTqA[data-size="small"] [data-component="buttonContent"] > :not(:last-child){margin-right:4px;}/*!sc*/ .gXPTqA[data-size="small"][data-component=IconButton]{width:28px;padding:unset;}/*!sc*/ .gXPTqA[data-size="large"]{padding:0 16px;height:40px;gap:8px;}/*!sc*/ .gXPTqA[data-size="large"] [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .gXPTqA[data-size="large"][data-component=IconButton]{width:40px;padding:unset;}/*!sc*/ .gXPTqA[data-block="block"]{width:100%;}/*!sc*/ .gXPTqA[data-label-wrap="true"]{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;height:unset;min-height:var(--control-medium-size,2rem);}/*!sc*/ .gXPTqA[data-label-wrap="true"] [data-component="buttonContent"]{-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;padding-block:calc(var(--control-medium-paddingBlock,0.375rem) - 2px);}/*!sc*/ .gXPTqA[data-label-wrap="true"] [data-component="text"]{white-space:unset;word-break:break-word;}/*!sc*/ .gXPTqA[data-label-wrap="true"][data-size="small"]{height:unset;min-height:var(--control-small-size,1.75rem);}/*!sc*/ .gXPTqA[data-label-wrap="true"][data-size="small"] [data-component="buttonContent"]{padding-block:calc(var(--control-small-paddingBlock,0.25rem) - 2px);}/*!sc*/ .gXPTqA[data-label-wrap="true"][data-size="large"]{height:unset;min-height:var(--control-large-size,2.5rem);padding-inline:var(--control-large-paddingInline-spacious,1rem);}/*!sc*/ .gXPTqA[data-label-wrap="true"][data-size="large"] [data-component="buttonContent"]{padding-block:calc(var(--control-large-paddingBlock,0.625rem) - 2px);}/*!sc*/ .gXPTqA[data-inactive]:not([disabled]){background-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));border-color:var(--button-inactive-bgColor,var(--button-inactive-bgColor-rest,var(--color-btn-inactive-bg,#eaeef2)));color:var(--button-inactive-fgColor,var(--button-inactive-fgColor-rest,var(--color-btn-inactive-text,#57606a)));}/*!sc*/ .gXPTqA[data-inactive]:not([disabled]):focus-visible{box-shadow:none;}/*!sc*/ .gXPTqA [data-component="leadingVisual"]{grid-area:leadingVisual;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gXPTqA [data-component="text"]{grid-area:text;line-height:1.4285714;white-space:nowrap;}/*!sc*/ .gXPTqA [data-component="trailingVisual"]{grid-area:trailingVisual;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gXPTqA [data-component="trailingAction"]{margin-right:-4px;color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gXPTqA [data-component="buttonContent"]{-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;display:grid;grid-template-areas:"leadingVisual text trailingVisual";grid-template-columns:min-content minmax(0,auto) min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}/*!sc*/ .gXPTqA [data-component="buttonContent"] > :not(:last-child){margin-right:8px;}/*!sc*/ .gXPTqA [data-component="loadingSpinner"]{grid-area:text;margin-right:0px !important;place-self:center;color:var(--fgColor-muted,var(--color-fg-muted,#656d76));}/*!sc*/ .gXPTqA [data-component="loadingSpinner"] + [data-component="text"]{visibility:hidden;}/*!sc*/ .gXPTqA:hover:not([disabled]){background-color:var(--control-transparent-bgColor-hover,var(--color-action-list-item-default-hover-bg,rgba(208,215,222,0.32)));}/*!sc*/ .gXPTqA:active:not([disabled]){background-color:var(--control-transparent-bgColor-active,var(--color-action-list-item-default-active-bg,rgba(208,215,222,0.48)));}/*!sc*/ .gXPTqA[aria-expanded=true]{background-color:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg,rgba(208,215,222,0.24)));}/*!sc*/ .gXPTqA[data-component="IconButton"][data-no-visuals]{color:var(--button-invisible-iconColor-rest,var(--fgColor-muted,var(--color-fg-muted,#656d76)));}/*!sc*/ .gXPTqA[data-no-visuals]{color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));}/*!sc*/ .gXPTqA:has([data-component="ButtonCounter"]){color:var(--button-invisible-fgColor-rest,var(--button-default-fgColor-rest,var(--color-btn-text,#24292f)));}/*!sc*/ .gXPTqA:disabled[data-no-visuals]{color:var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));}/*!sc*/ .gXPTqA:disabled[data-no-visuals] [data-component=ButtonCounter]{color:inherit;}/*!sc*/ .gXPTqA[data-size="medium"]{color:var(--fgColor-muted,var(--color-fg-subtle,#6e7781));padding-left:8px;padding-right:8px;}/*!sc*/ data-styled.g11[id="types__StyledButton-sc-ws60qy-0"]{content:"gVXRRg,loAzyw,cXsOlJ,gGdPyq,bmlmSe,dPmZyJ,gXPTqA,"}/*!sc*/ .hWlpPn{position:relative;display:inline-block;}/*!sc*/ .hWlpPn::after{position:absolute;z-index:1000000;display:none;padding:0.5em 0.75em;font:normal normal 11px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";-webkit-font-smoothing:subpixel-antialiased;color:var(--tooltip-fgColor,var(--fgColor-onEmphasis,var(--color-fg-on-emphasis,#ffffff)));text-align:center;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;-webkit-letter-spacing:normal;-moz-letter-spacing:normal;-ms-letter-spacing:normal;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:var(--tooltip-bgColor,var(--bgColor-emphasis,var(--color-neutral-emphasis-plus,#24292f)));border-radius:6px;opacity:0;}/*!sc*/ @-webkit-keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}/*!sc*/ @keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}/*!sc*/ .hWlpPn:hover::after,.hWlpPn:active::after,.hWlpPn:focus::after,.hWlpPn:focus-within::after{display:inline-block;-webkit-text-decoration:none;text-decoration:none;-webkit-animation-name:tooltip-appear;animation-name:tooltip-appear;-webkit-animation-duration:0.1s;animation-duration:0.1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;-webkit-animation-delay:0s;animation-delay:0s;}/*!sc*/ .hWlpPn.tooltipped-no-delay:hover::after,.hWlpPn.tooltipped-no-delay:active::after,.hWlpPn.tooltipped-no-delay:focus::after,.hWlpPn.tooltipped-no-delay:focus-within::after{-webkit-animation-delay:0s;animation-delay:0s;}/*!sc*/ .hWlpPn.tooltipped-multiline:hover::after,.hWlpPn.tooltipped-multiline:active::after,.hWlpPn.tooltipped-multiline:focus::after,.hWlpPn.tooltipped-multiline:focus-within::after{display:table-cell;}/*!sc*/ .hWlpPn.tooltipped-s::after,.hWlpPn.tooltipped-se::after,.hWlpPn.tooltipped-sw::after{top:100%;right:50%;margin-top:6px;}/*!sc*/ .hWlpPn.tooltipped-se::after{right:auto;left:50%;margin-left:-16px;}/*!sc*/ .hWlpPn.tooltipped-sw::after{margin-right:-16px;}/*!sc*/ .hWlpPn.tooltipped-n::after,.hWlpPn.tooltipped-ne::after,.hWlpPn.tooltipped-nw::after{right:50%;bottom:100%;margin-bottom:6px;}/*!sc*/ .hWlpPn.tooltipped-ne::after{right:auto;left:50%;margin-left:-16px;}/*!sc*/ .hWlpPn.tooltipped-nw::after{margin-right:-16px;}/*!sc*/ .hWlpPn.tooltipped-s::after,.hWlpPn.tooltipped-n::after{-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);}/*!sc*/ .hWlpPn.tooltipped-w::after{right:100%;bottom:50%;margin-right:6px;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);}/*!sc*/ .hWlpPn.tooltipped-e::after{bottom:50%;left:100%;margin-left:6px;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);}/*!sc*/ .hWlpPn.tooltipped-multiline::after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;word-wrap:break-word;white-space:pre-line;border-collapse:separate;}/*!sc*/ .hWlpPn.tooltipped-multiline.tooltipped-s::after,.hWlpPn.tooltipped-multiline.tooltipped-n::after{right:auto;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);}/*!sc*/ .hWlpPn.tooltipped-multiline.tooltipped-w::after,.hWlpPn.tooltipped-multiline.tooltipped-e::after{right:100%;}/*!sc*/ .hWlpPn.tooltipped-align-right-2::after{right:0;margin-right:0;}/*!sc*/ .hWlpPn.tooltipped-align-left-2::after{left:0;margin-left:0;}/*!sc*/ data-styled.g14[id="Tooltip__TooltipBase-sc-17tf59c-0"]{content:"hWlpPn,"}/*!sc*/ .kbCLEG{border:0;font-size:inherit;font-family:inherit;background-color:transparent;-webkit-appearance:none;color:inherit;width:100%;}/*!sc*/ .kbCLEG:focus{outline:0;}/*!sc*/ data-styled.g15[id="UnstyledTextInput-sc-14ypya-0"]{content:"kbCLEG,"}/*!sc*/ .liVpTx{display:inline-block;overflow:hidden;text-overflow:ellipsis;vertical-align:top;white-space:nowrap;max-width:125px;}/*!sc*/ data-styled.g17[id="Truncate__StyledTruncate-sc-23o1d2-0"]{content:"liVpTx,"}/*!sc*/ .iBVwpg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-inline:var(--stack-padding-normal,16px);-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:var(--control-xlarge-size,48px);box-shadow:inset 0px -1px var(--borderColor-muted,var(--borderColor-muted,var(--color-border-muted,hsla(210,18%,87%,1))));-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;border-bottom:none;max-width:100%;padding-left:8px;padding-right:8px;}/*!sc*/ data-styled.g92[id="UnderlineTabbedInterface__StyledUnderlineWrapper-sc-4ilrg0-0"]{content:"iBVwpg,"}/*!sc*/ .gJyWUl{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;list-style:none;white-space:nowrap;padding:0;margin:0;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;position:relative;}/*!sc*/ data-styled.g93[id="UnderlineTabbedInterface__StyledUnderlineItemList-sc-4ilrg0-1"]{content:"gJyWUl,"}/*!sc*/ .beOdPj{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;cursor:pointer;font:inherit;position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;color:var(--fgColor-default,var(--color-fg-default,#1F2328));text-align:center;-webkit-text-decoration:none;text-decoration:none;line-height:var(--text-body-lineHeight-medium,1.4285);border-radius:var(--borderRadius-medium,6px);font-size:var(--text-body-size-medium,14px);padding-inline:var(--control-medium-paddingInline-condensed,8px);padding-block:var(--control-medium-paddingBlock,6px);-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}/*!sc*/ @media (hover:hover){.beOdPj:hover{background-color:var(--bgColor-neutral-muted,var(--bgColor-neutral-muted,var(--color-neutral-subtle,rgba(234,238,242,0.5))));-webkit-transition:background 0.12s ease-out;transition:background 0.12s ease-out;-webkit-text-decoration:none;text-decoration:none;}}/*!sc*/ .beOdPj:focus:{outline:2px solid transparent;box-shadow:inset 0 0 0 2px var(--fgColor-accent,var(--fgColor-accent,var(--color-accent-fg,#0969da)));}/*!sc*/ .beOdPj:focus::not(:focus-visible){box-shadow:none;}/*!sc*/ .beOdPj:focus-visible{outline:2px solid transparent;box-shadow:inset 0 0 0 2px var(--fgColor-accent,var(--fgColor-accent,var(--color-accent-fg,#0969da)));}/*!sc*/ .beOdPj [data-content]::before{content:attr(data-content);display:block;height:0;font-weight:var(--base-text-weight-semibold,500);visibility:hidden;white-space:nowrap;}/*!sc*/ .beOdPj [data-component='icon']{color:var(--fgColor-muted,var(--fgColor-muted,var(--color-fg-muted,#656d76)));-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;margin-inline-end:var(--control-medium-gap,8px);}/*!sc*/ .beOdPj [data-component='counter']{margin-inline-start:var(--control-medium-gap,8px);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}/*!sc*/ .beOdPj::after{position:absolute;right:50%;bottom:calc(50% - calc(var(--control-xlarge-size,48px) / 2 + 1px));width:100%;height:2px;content:'';background-color:transparent;border-radius:0;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%);}/*!sc*/ .beOdPj[aria-current]:not([aria-current='false']) [data-component='text'],.beOdPj[aria-selected='true'] [data-component='text']{font-weight:var(--base-text-weight-semibold,500);}/*!sc*/ .beOdPj[aria-current]:not([aria-current='false'])::after,.beOdPj[aria-selected='true']::after{background-color:var(--underlineNav-borderColor-active,var(--color-primer-border-active,#fd8c73));}/*!sc*/ @media (forced-colors:active){.beOdPj[aria-current]:not([aria-current='false'])::after,.beOdPj[aria-selected='true']::after{background-color:LinkText;}}/*!sc*/ data-styled.g94[id="UnderlineTabbedInterface__StyledUnderlineItem-sc-4ilrg0-2"]{content:"beOdPj,"}/*!sc*/ </style> <!-- --> <!-- --> <div class="Box-sc-g0xbh4-0 iVEunk"><div class="Box-sc-g0xbh4-0 jzuOtQ"><div class="Box-sc-g0xbh4-0 bGojzy"></div></div><div class="Box-sc-g0xbh4-0 iNSVHo"><div class="Box-sc-g0xbh4-0 bVgnfw"><div class="Box-sc-g0xbh4-0 CEgMp"><button type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-label="master branch" data-testid="anchor-button" class="types__StyledButton-sc-ws60qy-0 gVXRRg overview-ref-selector width-full" data-loading="false" data-size="medium" aria-describedby="branch-picker-repos-header-ref-selector-loading-announcement" id="branch-picker-repos-header-ref-selector"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg"><span data-component="text"><div class="Box-sc-g0xbh4-0 bZBlpz"><div class="Box-sc-g0xbh4-0 lhTYNA"><svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></div><div class="Box-sc-g0xbh4-0 ffLUq ref-selector-button-text-container"><span class="Text__StyledText-sc-17v1xeu-0 eMMFM"> <!-- -->master</span></div></div></span><span data-component="trailingVisual" class="Box-sc-g0xbh4-0 hzSPyu"><svg aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><button hidden="" data-hotkey-scope="read-only-cursor-text-area"></button></div><div class="Box-sc-g0xbh4-0 fLXEGX"><a style="--button-color:fg.muted" type="button" href="/JosephSilber/bouncer/branches" class="types__StyledButton-sc-ws60qy-0 loAzyw" data-loading="false" data-size="medium" aria-describedby=":Rclab:-loading-announcement"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg"><span data-component="leadingVisual" class="Box-sc-g0xbh4-0 hzSPyu"><svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></span><span data-component="text">Branches</span></span></a><a style="--button-color:fg.muted" type="button" href="/JosephSilber/bouncer/tags" class="types__StyledButton-sc-ws60qy-0 loAzyw" data-loading="false" data-size="medium" aria-describedby=":Rklab:-loading-announcement"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg"><span data-component="leadingVisual" class="Box-sc-g0xbh4-0 hzSPyu"><svg aria-hidden="true" focusable="false" class="octicon octicon-tag" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path></svg></span><span data-component="text">Tags</span></span></a></div><div class="Box-sc-g0xbh4-0 dqfxud"><a style="--button-color:fg.muted" type="button" aria-label="Go to Branches page" href="/JosephSilber/bouncer/branches" class="types__StyledButton-sc-ws60qy-0 cXsOlJ" data-loading="false" data-no-visuals="true" data-size="medium" aria-describedby=":Relab:-loading-announcement"><svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg></a><a style="--button-color:fg.muted" type="button" aria-label="Go to Tags page" href="/JosephSilber/bouncer/tags" class="types__StyledButton-sc-ws60qy-0 cXsOlJ" data-loading="false" data-no-visuals="true" data-size="medium" aria-describedby=":Rmlab:-loading-announcement"><svg aria-hidden="true" focusable="false" class="octicon octicon-tag" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path></svg></a></div></div><div class="Box-sc-g0xbh4-0 jxTzTd"><div class="Box-sc-g0xbh4-0 gqqBXN"><div class="Box-sc-g0xbh4-0 dzXgxt"><!--$--><div class="Box-sc-g0xbh4-0 iWFGlI"><span class="TextInputWrapper__TextInputBaseWrapper-sc-1mqhpbi-0 TextInputWrapper-sc-1mqhpbi-1 gwqFqs decvaq TextInput-wrapper" aria-busy="false"><span class="TextInput-icon" id=":R2j5ab:" aria-hidden="true"><svg aria-hidden="true" focusable="false" class="octicon octicon-search" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg></span><input type="text" aria-label="Go to file" role="combobox" aria-controls="file-results-list" aria-expanded="false" aria-haspopup="dialog" autoCorrect="off" spellcheck="false" placeholder="Go to file" aria-describedby=":R2j5ab: :R2j5abH1:" data-component="input" class="UnstyledTextInput-sc-14ypya-0 kbCLEG" value=""/><span class="TextInput-icon" id=":R2j5abH1:" aria-hidden="true"></span></span></div><!--/$--></div><div class="Box-sc-g0xbh4-0 YUPas"><button type="button" class="types__StyledButton-sc-ws60qy-0 gGdPyq" data-loading="false" data-no-visuals="true" data-size="medium" aria-describedby=":Rr5ab:-loading-announcement"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg"><span data-component="text">Go to file</span></span></button></div><div class="react-directory-add-file-icon"></div><div class="react-directory-remove-file-icon"></div></div><button type="button" aria-haspopup="true" aria-expanded="false" tabindex="0" class="types__StyledButton-sc-ws60qy-0 bmlmSe" data-loading="false" data-size="medium" aria-describedby=":R55ab:-loading-announcement" id=":R55ab:"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg"><span data-component="leadingVisual" class="Box-sc-g0xbh4-0 hzSPyu"><svg aria-hidden="true" focusable="false" class="hide-sm" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg></span><span data-component="text">Code</span><span data-component="trailingVisual" class="Box-sc-g0xbh4-0 hzSPyu"><svg aria-hidden="true" focusable="false" class="octicon octicon-triangle-down" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></span></span></button><div class="Box-sc-g0xbh4-0 izFOf"><button data-component="IconButton" type="button" aria-label="Open more actions menu" aria-haspopup="true" aria-expanded="false" tabindex="0" class="types__StyledButton-sc-ws60qy-0 gGdPyq prc-Button-IconButton-szpyj" data-loading="false" data-no-visuals="true" data-size="medium" aria-describedby=":R75ab:-loading-announcement" id=":R75ab:"><svg aria-hidden="true" focusable="false" class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg></button></div></div></div><div class="Box-sc-g0xbh4-0 vIPPs"><div data-hpc="true"><button hidden="" data-testid="focus-next-element-button" data-hotkey="j"></button><button hidden="" data-testid="focus-previous-element-button" data-hotkey="k"></button><h2 class="sr-only prc-Heading-Heading-6CmGO" data-testid="screen-reader-heading" id="folders-and-files">Folders and files</h2><table aria-labelledby="folders-and-files" class="Box-sc-g0xbh4-0 fdROMU"><thead class="Box-sc-g0xbh4-0 jGKpsv"><tr class="Box-sc-g0xbh4-0 jdgHnn"><th colSpan="2" class="Box-sc-g0xbh4-0 bQivRW"><span class="text-bold">Name</span></th><th colSpan="1" class="Box-sc-g0xbh4-0 ldkMIO"><span class="text-bold">Name</span></th><th class="hide-sm"><div title="Last commit message" class="Truncate__StyledTruncate-sc-23o1d2-0 liVpTx width-fit"><span class="text-bold">Last commit message</span></div></th><th colSpan="1" class="Box-sc-g0xbh4-0 jMbWeI"><div title="Last commit date" class="Truncate__StyledTruncate-sc-23o1d2-0 liVpTx width-fit"><span class="text-bold">Last commit date</span></div></th></tr></thead><tbody><tr class="Box-sc-g0xbh4-0 gpqjiB"><td colSpan="3" class="bgColor-muted p-1 rounded-top-2"><div class="Box-sc-g0xbh4-0 dzCJzi"><h2 class="sr-only prc-Heading-Heading-6CmGO" data-testid="screen-reader-heading">Latest commit</h2><div style="width:120px" class="Skeleton Skeleton--text" data-testid="loading"> </div><div class="d-flex flex-shrink-0 gap-2"><div data-testid="latest-commit-details" class="d-none d-sm-flex flex-items-center"></div><div class="d-flex gap-2"><h2 class="sr-only prc-Heading-Heading-6CmGO" data-testid="screen-reader-heading">History</h2><a href="/JosephSilber/bouncer/commits/master/" class="types__StyledButton-sc-ws60qy-0 dPmZyJ d-none d-lg-flex LinkButton-module__code-view-link-button--xvCGA flex-items-center fgColor-default" data-loading="false" data-size="small" aria-describedby=":Raqj8pab:-loading-announcement"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg"><span data-component="leadingVisual" class="Box-sc-g0xbh4-0 hzSPyu"><svg aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span><span data-component="text"><span class="fgColor-default">658 Commits</span></span></span></a><div class="d-sm-none"></div><div class="d-flex d-lg-none"><span role="tooltip" aria-label="658 Commits" id="history-icon-button-tooltip" class="Tooltip__TooltipBase-sc-17tf59c-0 hWlpPn tooltipped-n"><a href="/JosephSilber/bouncer/commits/master/" class="types__StyledButton-sc-ws60qy-0 dPmZyJ LinkButton-module__code-view-link-button--xvCGA flex-items-center fgColor-default" data-loading="false" data-size="small" aria-describedby=":R1iqj8pab:-loading-announcement history-icon-button-tooltip"><span data-component="buttonContent" class="Box-sc-g0xbh4-0 gUkoLg"><span data-component="leadingVisual" class="Box-sc-g0xbh4-0 hzSPyu"><svg aria-hidden="true" focusable="false" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg></span></span></a></span></div></div></div></div></td></tr><tr class="react-directory-row undefined" id="folder-row-0"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="This path skips through empty directories" aria-label=".github/workflows, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/.github/workflows"><span class="react-directory-default-color" data-testid="path-name-segment">.github/</span><span class="" data-testid="path-name-segment">workflows</span></a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="This path skips through empty directories" aria-label=".github/workflows, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/.github/workflows"><span class="react-directory-default-color" data-testid="path-name-segment">.github/</span><span class="" data-testid="path-name-segment">workflows</span></a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-1"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="This path skips through empty directories" aria-label="assets/branding, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/assets/branding"><span class="react-directory-default-color" data-testid="path-name-segment">assets/</span><span class="" data-testid="path-name-segment">branding</span></a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="This path skips through empty directories" aria-label="assets/branding, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/assets/branding"><span class="react-directory-default-color" data-testid="path-name-segment">assets/</span><span class="" data-testid="path-name-segment">branding</span></a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-2"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="middleware" aria-label="middleware, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/middleware">middleware</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="middleware" aria-label="middleware, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/middleware">middleware</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-3"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="migrations" aria-label="migrations, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/migrations">migrations</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="migrations" aria-label="migrations, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/migrations">migrations</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-4"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="src" aria-label="src, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/src">src</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="src" aria-label="src, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/src">src</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-5"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="tests" aria-label="tests, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/tests">tests</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="tests" aria-label="tests, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/tests">tests</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-6"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="workbench" aria-label="workbench, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/workbench">workbench</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="icon-directory" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="workbench" aria-label="workbench, (Directory)" class="Link--primary" href="/JosephSilber/bouncer/tree/master/workbench">workbench</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-7"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitattributes" aria-label=".gitattributes, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/.gitattributes">.gitattributes</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitattributes" aria-label=".gitattributes, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/.gitattributes">.gitattributes</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-8"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitignore" aria-label=".gitignore, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/.gitignore">.gitignore</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title=".gitignore" aria-label=".gitignore, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/.gitignore">.gitignore</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row undefined" id="folder-row-9"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="LICENSE.txt" aria-label="LICENSE.txt, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/LICENSE.txt">LICENSE.txt</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="LICENSE.txt" aria-label="LICENSE.txt, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/LICENSE.txt">LICENSE.txt</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-10"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="composer.json" aria-label="composer.json, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/composer.json">composer.json</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="composer.json" aria-label="composer.json, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/composer.json">composer.json</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-11"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="phpunit.xml" aria-label="phpunit.xml, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/phpunit.xml">phpunit.xml</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="phpunit.xml" aria-label="phpunit.xml, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/phpunit.xml">phpunit.xml</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="react-directory-row truncate-for-mobile" id="folder-row-12"><td class="react-directory-row-name-cell-small-screen" colSpan="2"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="readme.md" aria-label="readme.md, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/readme.md">readme.md</a></div></div></div></div></td><td class="react-directory-row-name-cell-large-screen" colSpan="1"><div class="react-directory-filename-column"><svg aria-hidden="true" focusable="false" class="color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg><div class="overflow-hidden"><div class="react-directory-filename-cell"><div class="react-directory-truncate"><a title="readme.md" aria-label="readme.md, (File)" class="Link--primary" href="/JosephSilber/bouncer/blob/master/readme.md">readme.md</a></div></div></div></div></td><td class="react-directory-row-commit-cell"><div class="Skeleton Skeleton--text"> </div></td><td><div class="Skeleton Skeleton--text"> </div></td></tr><tr class="Box-sc-g0xbh4-0 eNCcrz show-for-mobile" data-testid="view-all-files-row"><td colSpan="3" class="Box-sc-g0xbh4-0 bHTcCe"><div><button class="prc-Link-Link-85e08">View all files</button></div></td></tr></tbody></table></div><div class="Box-sc-g0xbh4-0 csrIcr"><div class="Box-sc-g0xbh4-0 bUQNHB"><div itemscope="" itemType="https://schema.org/abstract" class="Box-sc-g0xbh4-0 jPdcfu"><h2 class="_VisuallyHidden__VisuallyHidden-sc-11jhm7a-0 brGdpi">Repository files navigation</h2><nav aria-label="Repository files" class="UnderlineTabbedInterface__StyledUnderlineWrapper-sc-4ilrg0-0 iBVwpg"><ul role="list" class="UnderlineTabbedInterface__StyledUnderlineItemList-sc-4ilrg0-1 gJyWUl"><li class="Box-sc-g0xbh4-0 hUCRAk"><a href="#" aria-current="page" class="UnderlineTabbedInterface__StyledUnderlineItem-sc-4ilrg0-2 beOdPj"><span data-component="icon"><svg aria-hidden="true" focusable="false" class="octicon octicon-book" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path></svg></span><span data-component="text" data-content="README">README</span></a></li><li class="Box-sc-g0xbh4-0 hUCRAk"><a href="#" class="UnderlineTabbedInterface__StyledUnderlineItem-sc-4ilrg0-2 beOdPj"><span data-component="icon"><svg aria-hidden="true" focusable="false" class="octicon octicon-law" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path></svg></span><span data-component="text" data-content="MIT license">MIT license</span></a></li></ul></nav><button style="--button-color:fg.subtle" type="button" aria-label="Outline" aria-haspopup="true" aria-expanded="false" tabindex="0" class="types__StyledButton-sc-ws60qy-0 gXPTqA" data-loading="false" data-size="medium" aria-describedby=":Rr9ab:-loading-announcement" id=":Rr9ab:"><svg aria-hidden="true" focusable="false" class="octicon octicon-list-unordered" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg></button></div><div class="Box-sc-g0xbh4-0 QkQOb js-snippet-clipboard-copy-unpositioned" data-hpc="true"><article class="markdown-body entry-content container-lg" itemprop="text"><p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1403741/39606419-587dbb1e-4f03-11e8-8e54-1bb2f39fb0f5.jpg"><img src="https://user-images.githubusercontent.com/1403741/39606419-587dbb1e-4f03-11e8-8e54-1bb2f39fb0f5.jpg" style="max-width: 100%;"></a></p> <div class="markdown-heading" dir="auto"><h1 tabindex="-1" class="heading-element" dir="auto">Bouncer</h1><a id="user-content-bouncer" class="anchor" aria-label="Permalink: Bouncer" href="#bouncer"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto"> <a href="https://github.com/JosephSilber/bouncer/actions"><img src="https://github.com/JosephSilber/bouncer/actions/workflows/tests.yml/badge.svg" alt="Build Status" style="max-width: 100%;"></a> <a href="https://packagist.org/packages/silber/bouncer" rel="nofollow"><img src="https://camo.githubusercontent.com/934f9de32429e54a0e48efb04a839d29ec708c60a7062cbf3f28f457ef64c4a9/68747470733a2f2f706f7365722e707567782e6f72672f73696c6265722f626f756e6365722f642f746f74616c2e737667" alt="Total Downloads" data-canonical-src="https://poser.pugx.org/silber/bouncer/d/total.svg" style="max-width: 100%;"></a> <a href="https://github.com/JosephSilber/bouncer/blob/master/LICENSE.txt"><img src="https://camo.githubusercontent.com/63facf7d1e9525d3210f5519bd21f5ad094804e54b48de00d850b42dc721dfa9/68747470733a2f2f706f7365722e707567782e6f72672f73696c6265722f626f756e6365722f6c6963656e73652e737667" alt="License" data-canonical-src="https://poser.pugx.org/silber/bouncer/license.svg" style="max-width: 100%;"></a> </p> <p dir="auto">Bouncer is an elegant, framework-agnostic approach to managing roles and abilities for any app using Eloquent models.</p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Table of Contents</h2><a id="user-content-table-of-contents" class="anchor" aria-label="Permalink: Table of Contents" href="#table-of-contents"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <details><summary>Click to expand</summary><p dir="auto"> </p><ul dir="auto"> <li><a href="#introduction">Introduction</a></li> <li><a href="#installation">Installation</a> <ul dir="auto"> <li><a href="#installing-bouncer-in-a-laravel-app">Installing Bouncer in a Laravel app</a></li> <li><a href="#installing-bouncer-in-a-non-laravel-app">Installing Bouncer in a non-Laravel app</a></li> <li><a href="#enabling-cache">Enabling cache</a></li> </ul> </li> <li><a href="#usage">Usage</a> <ul dir="auto"> <li><a href="#creating-roles-and-abilities">Creating roles and abilities</a></li> <li><a href="#assigning-roles-to-a-user">Assigning roles to a user</a></li> <li><a href="#giving-a-user-an-ability-directly">Giving a user an ability directly</a></li> <li><a href="#restricting-an-ability-to-a-model">Restricting an ability to a model</a></li> <li><a href="#allowing-a-user-or-role-to-own-a-model">Allowing a user or role to "own" a model</a></li> <li><a href="#retracting-a-role-from-a-user">Retracting a role from a user</a></li> <li><a href="#removing-an-ability">Removing an ability</a></li> <li><a href="#forbidding-an-ability">Forbidding an ability</a></li> <li><a href="#unforbidding-an-ability">Unforbidding an ability</a></li> <li><a href="#checking-a-users-roles">Checking a user's roles</a></li> <li><a href="#querying-users-by-their-roles">Querying users by their roles</a></li> <li><a href="#getting-all-roles-for-a-user">Getting all roles for a user</a></li> <li><a href="#getting-all-abilities-for-a-user">Getting all abilities for a user</a></li> <li><a href="#authorizing-users">Authorizing users</a></li> <li><a href="#blade-directives">Blade directives</a></li> <li><a href="#refreshing-the-cache">Refreshing the cache</a></li> </ul> </li> <li><a href="#multi-tenancy">Multi-tenancy</a> <ul dir="auto"> <li><a href="#the-scope-middleware">The scope middleware</a></li> <li><a href="#customizing-bouncers-scope">Customizing Bouncer's scope</a></li> </ul> </li> <li><a href="#configuration">Configuration</a> <ul dir="auto"> <li><a href="#cache">Cache</a></li> <li><a href="#tables">Tables</a></li> <li><a href="#custom-models">Custom models</a></li> <li><a href="#user-model">User Model</a></li> <li><a href="#ownership">Ownership</a></li> </ul> </li> <li><a href="#faq">FAQ</a> <ul dir="auto"> <li><a href="#where-do-i-set-up-my-apps-roles-and-abilities">Where do I set up my app's roles and abilities?</a></li> <li><a href="#can-i-use-a-different-set-of-roles--abilities-for-the-public--dashboard-sections-of-my-site-respectively">Can I use a different set of roles &amp; abilities for the public &amp; dashboard sections of my site, respectively?</a></li> <li><a href="#im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-the-specified-key-was-too-long">I'm trying to run the migration, but I'm getting a SQL error that the "specified key was too long"</a></li> <li><a href="#im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-there-is-a-syntax-error-or-access-violation-1064--to-use-near-json-not-null">I'm trying to run the migration, but I'm getting a SQL error that there is a "Syntax error or access violation: 1064 ... to use near json not null)"</a></li> </ul> </li> <li><a href="#console-commands">Console commands</a> <ul dir="auto"> <li><a href="#bouncerclean"><code>bouncer:clean</code></a></li> </ul> </li> <li><a href="#cheat-sheet">Cheat sheet</a></li> <li><a href="#alternative">Alternative</a></li> <li><a href="#license">License</a></li> </ul> <p dir="auto"></p></details> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Introduction</h2><a id="user-content-introduction" class="anchor" aria-label="Permalink: Introduction" href="#introduction"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Bouncer is an elegant, framework-agnostic approach to managing roles and abilities for any app using Eloquent models. With an expressive and fluent syntax, it stays out of your way as much as possible: use it when you want, ignore it when you don't.</p> <p dir="auto">For a quick, glanceable list of Bouncer's features, check out <a href="#cheat-sheet">the cheat sheet</a>.</p> <p dir="auto">Bouncer works well with other abilities you have hard-coded in your own app. Your code always takes precedence: if your code allows an action, Bouncer will not interfere.</p> <p dir="auto">Once installed, you can simply tell the bouncer what you want to allow at the gate:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Give a user the ability to create posts Bouncer::allow($user)-&gt;to('create', Post::class); // Alternatively, do it through a role Bouncer::allow('admin')-&gt;to('create', Post::class); Bouncer::assign('admin')-&gt;to($user); // You can also grant an ability only to a specific model Bouncer::allow($user)-&gt;to('edit', $post);"><pre><span class="pl-c">// Give a user the ability to create posts</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">create</span>'</span>, <span class="pl-v">Post</span>::class); <span class="pl-c">// Alternatively, do it through a role</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">create</span>'</span>, <span class="pl-v">Post</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">assign</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>); <span class="pl-c">// You can also grant an ability only to a specific model</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">edit</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>);</pre></div> <p dir="auto">When you check abilities at Laravel's gate, Bouncer will automatically be consulted. If Bouncer sees an ability that has been granted to the current user (whether directly, or through a role) it'll authorize the check.</p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Installation</h2><a id="user-content-installation" class="anchor" aria-label="Permalink: Installation" href="#installation"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <blockquote> <p dir="auto"><strong>Note</strong>: Bouncer v1.0.2 requires PHP 8.2+ and Laravel/Eloquent 11+.</p> <p dir="auto">If you're on Laravel v6-v10, use <a href="https://github.com/JosephSilber/bouncer/tree/v1.0.1">Bouncer v1.0.1</a>. If you're on Laravel v5.5-v5.8, use <a href="https://github.com/JosephSilber/bouncer/tree/v1.0.0-rc.6">Bouncer RC6</a>.</p> </blockquote> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Installing Bouncer in a Laravel app</h3><a id="user-content-installing-bouncer-in-a-laravel-app" class="anchor" aria-label="Permalink: Installing Bouncer in a Laravel app" href="#installing-bouncer-in-a-laravel-app"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <ol dir="auto"> <li> <p dir="auto">Install Bouncer with <a href="https://getcomposer.org/doc/00-intro.md" rel="nofollow">composer</a>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="composer require silber/bouncer"><pre class="notranslate"><code>composer require silber/bouncer </code></pre></div> </li> <li> <p dir="auto">Add Bouncer's trait to your user model:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Silber\Bouncer\Database\HasRolesAndAbilities; class User extends Model { use HasRolesAndAbilities; }"><pre><span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Database</span>\<span class="pl-v">HasRolesAndAbilities</span>; <span class="pl-k">class</span> <span class="pl-v">User</span> <span class="pl-k">extends</span> <span class="pl-v">Model</span> { <span class="pl-k">use</span> <span class="pl-v">HasRolesAndAbilities</span>; }</pre></div> </li> <li> <p dir="auto">Now, to run Bouncer's migrations. First publish the migrations into your app's <code>migrations</code> directory, by running the following command:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="php artisan vendor:publish --tag=&quot;bouncer.migrations&quot;"><pre class="notranslate"><code>php artisan vendor:publish --tag="bouncer.migrations" </code></pre></div> </li> <li> <p dir="auto">Finally, run the migrations:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="php artisan migrate"><pre class="notranslate"><code>php artisan migrate </code></pre></div> </li> </ol> <div class="markdown-heading" dir="auto"><h4 tabindex="-1" class="heading-element" dir="auto">Facade</h4><a id="user-content-facade" class="anchor" aria-label="Permalink: Facade" href="#facade"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Whenever you use the <code>Bouncer</code> facade in your code, remember to add this line to your namespace imports at the top of the file:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Bouncer;"><pre><span class="pl-k">use</span> <span class="pl-v">Bouncer</span>;</pre></div> <p dir="auto">For more information about Laravel Facades, refer to <a href="https://laravel.com/docs/11.x/facades" rel="nofollow">the Laravel documentation</a>.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Installing Bouncer in a non-Laravel app</h3><a id="user-content-installing-bouncer-in-a-non-laravel-app" class="anchor" aria-label="Permalink: Installing Bouncer in a non-Laravel app" href="#installing-bouncer-in-a-non-laravel-app"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <ol dir="auto"> <li> <p dir="auto">Install Bouncer with <a href="https://getcomposer.org/doc/00-intro.md" rel="nofollow">composer</a>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="composer require silber/bouncer"><pre class="notranslate"><code>composer require silber/bouncer </code></pre></div> </li> <li> <p dir="auto">Set up the database with <a href="https://github.com/illuminate/database/blob/master/README.md">the Eloquent Capsule component</a>:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Illuminate\Database\Capsule\Manager as Capsule; $capsule = new Capsule; $capsule-&gt;addConnection([/* connection config */]); $capsule-&gt;setAsGlobal();"><pre><span class="pl-k">use</span> <span class="pl-v">Illuminate</span>\<span class="pl-v">Database</span>\<span class="pl-v">Capsule</span>\<span class="pl-v">Manager</span> <span class="pl-k">as</span> <span class="pl-v">Capsule</span>; <span class="pl-s1"><span class="pl-c1">$</span>capsule</span> = <span class="pl-k">new</span> <span class="pl-v">Capsule</span>; <span class="pl-s1"><span class="pl-c1">$</span>capsule</span>-&gt;<span class="pl-en">addConnection</span>([<span class="pl-c">/* connection config */</span>]); <span class="pl-s1"><span class="pl-c1">$</span>capsule</span>-&gt;<span class="pl-en">setAsGlobal</span>();</pre></div> <p dir="auto">Refer to <a href="https://github.com/illuminate/database/blob/master/README.md">the Eloquent Capsule documentation</a> for more details.</p> </li> <li> <p dir="auto">Run the migrations by either of the following methods:</p> <ul dir="auto"> <li> <p dir="auto">Use a tool such as <a href="https://github.com/michaeldyrynda/vagabond">vagabond</a> to run Laravel migrations outside of a Laravel app. You'll find the necessary migrations in <a href="https://github.com/JosephSilber/bouncer/blob/master/migrations/create_bouncer_tables.php#L18-L79">the migrations stub file</a>.</p> </li> <li> <p dir="auto">Alternatively, you can run <a href="https://github.com/JosephSilber/bouncer/blob/master/migrations/sql/MySQL.sql">the raw SQL</a> directly in your database.</p> </li> </ul> </li> <li> <p dir="auto">Add Bouncer's trait to your user model:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Illuminate\Database\Eloquent\Model; use Silber\Bouncer\Database\HasRolesAndAbilities; class User extends Model { use HasRolesAndAbilities; }"><pre><span class="pl-k">use</span> <span class="pl-v">Illuminate</span>\<span class="pl-v">Database</span>\<span class="pl-v">Eloquent</span>\<span class="pl-v">Model</span>; <span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Database</span>\<span class="pl-v">HasRolesAndAbilities</span>; <span class="pl-k">class</span> <span class="pl-v">User</span> <span class="pl-k">extends</span> <span class="pl-v">Model</span> { <span class="pl-k">use</span> <span class="pl-v">HasRolesAndAbilities</span>; }</pre></div> </li> <li> <p dir="auto">Create an instance of Bouncer:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Silber\Bouncer\Bouncer; $bouncer = Bouncer::create(); // If you are in a request with a current user // that you'd wish to check permissions for, // pass that user to the &quot;create&quot; method: $bouncer = Bouncer::create($user);"><pre><span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Bouncer</span>; <span class="pl-s1"><span class="pl-c1">$</span>bouncer</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">create</span>(); <span class="pl-c">// If you are in a request with a current user</span> <span class="pl-c">// that you'd wish to check permissions for,</span> <span class="pl-c">// pass that user to the "create" method:</span> <span class="pl-s1"><span class="pl-c1">$</span>bouncer</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">create</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>);</pre></div> <p dir="auto">If you're using dependency injection in your app, you may register the <code>Bouncer</code> instance as a singleton in the container:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Silber\Bouncer\Bouncer; use Illuminate\Container\Container; Container::getInstance()-&gt;singleton(Bouncer::class, function () { return Bouncer::create(); });"><pre><span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Bouncer</span>; <span class="pl-k">use</span> <span class="pl-v">Illuminate</span>\<span class="pl-v">Container</span>\<span class="pl-v">Container</span>; <span class="pl-v">Container</span>::<span class="pl-en">getInstance</span>()-&gt;<span class="pl-en">singleton</span>(<span class="pl-v">Bouncer</span>::class, <span class="pl-k">function</span> () { <span class="pl-k">return</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">create</span>(); });</pre></div> <p dir="auto">You can now inject <code>Bouncer</code> into any class that needs it.</p> <p dir="auto">The <code>create</code> method creates a <code>Bouncer</code> instance with sensible defaults. To fully customize it, use the <code>make</code> method to get a factory instance. Call <code>create()</code> on the factory to create the <code>Bouncer</code> instance:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Silber\Bouncer\Bouncer; $bouncer = Bouncer::make() -&gt;withCache($customCacheInstance) -&gt;create();"><pre><span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Bouncer</span>; <span class="pl-s1"><span class="pl-c1">$</span>bouncer</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">make</span>() -&gt;<span class="pl-en">withCache</span>(<span class="pl-s1"><span class="pl-c1">$</span>customCacheInstance</span>) -&gt;<span class="pl-en">create</span>();</pre></div> <p dir="auto">Check out <a href="https://github.com/JosephSilber/bouncer/blob/c974953a0b1d8d187023002cdfae1800f3ccdb02/src/Factory.php">the <code>Factory</code> class</a> to see all the customizations available.</p> </li> <li> <p dir="auto">Set which model is used as the user model throughout your app:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$bouncer-&gt;useUserModel(User::class);"><pre><span class="pl-s1"><span class="pl-c1">$</span>bouncer</span>-&gt;<span class="pl-en">useUserModel</span>(<span class="pl-v">User</span>::class);</pre></div> <p dir="auto">For additional configuration, check out <a href="#configuration">the Configuration section</a> below.</p> </li> </ol> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Enabling cache</h3><a id="user-content-enabling-cache" class="anchor" aria-label="Permalink: Enabling cache" href="#enabling-cache"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">By default, Bouncer's queries are cached for the current request. For better performance, you may want to <a href="#cache">enable cross-request caching</a>.</p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Usage</h2><a id="user-content-usage" class="anchor" aria-label="Permalink: Usage" href="#usage"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Adding roles and abilities to users is made extremely easy. You do not have to create a role or an ability in advance. Simply pass the name of the role/ability, and Bouncer will create it if it doesn't exist.</p> <blockquote> <p dir="auto"><strong>Note:</strong> the examples below all use the <code>Bouncer</code> facade. If you don't use facades, you can instead inject an instance of <code>Silber\Bouncer\Bouncer</code> into your class.</p> </blockquote> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Creating roles and abilities</h3><a id="user-content-creating-roles-and-abilities" class="anchor" aria-label="Permalink: Creating roles and abilities" href="#creating-roles-and-abilities"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Let's create a role called <code>admin</code> and give it the ability to <code>ban-users</code> from our site:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow('admin')-&gt;to('ban-users');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>);</pre></div> <p dir="auto">That's it. Behind the scenes, Bouncer will create both a <code>Role</code> model and an <code>Ability</code> model for you.</p> <p dir="auto">If you want to add additional attributes to the role/ability, such as a human-readable title, you can manually create them using the <code>role</code> and <code>ability</code> methods on the <code>Bouncer</code> class:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$admin = Bouncer::role()-&gt;firstOrCreate([ 'name' =&gt; 'admin', 'title' =&gt; 'Administrator', ]); $ban = Bouncer::ability()-&gt;firstOrCreate([ 'name' =&gt; 'ban-users', 'title' =&gt; 'Ban users', ]); Bouncer::allow($admin)-&gt;to($ban);"><pre><span class="pl-s1"><span class="pl-c1">$</span>admin</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">role</span>()-&gt;<span class="pl-en">firstOrCreate</span>([ <span class="pl-s">'<span class="pl-s">name</span>'</span> =&gt; <span class="pl-s">'<span class="pl-s">admin</span>'</span>, <span class="pl-s">'<span class="pl-s">title</span>'</span> =&gt; <span class="pl-s">'<span class="pl-s">Administrator</span>'</span>, ]); <span class="pl-s1"><span class="pl-c1">$</span>ban</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">ability</span>()-&gt;<span class="pl-en">firstOrCreate</span>([ <span class="pl-s">'<span class="pl-s">name</span>'</span> =&gt; <span class="pl-s">'<span class="pl-s">ban-users</span>'</span>, <span class="pl-s">'<span class="pl-s">title</span>'</span> =&gt; <span class="pl-s">'<span class="pl-s">Ban users</span>'</span>, ]); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>admin</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s1"><span class="pl-c1">$</span>ban</span>);</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Assigning roles to a user</h3><a id="user-content-assigning-roles-to-a-user" class="anchor" aria-label="Permalink: Assigning roles to a user" href="#assigning-roles-to-a-user"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">To now give the <code>admin</code> role to a user, simply tell the bouncer that the given user should be assigned the admin role:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::assign('admin')-&gt;to($user);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">assign</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>);</pre></div> <p dir="auto">Alternatively, you can call the <code>assign</code> method directly on the user:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$user-&gt;assign('admin');"><pre><span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">assign</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>);</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Giving a user an ability directly</h3><a id="user-content-giving-a-user-an-ability-directly" class="anchor" aria-label="Permalink: Giving a user an ability directly" href="#giving-a-user-an-ability-directly"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Sometimes you might want to give a user an ability directly, without using a role:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow($user)-&gt;to('ban-users');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>);</pre></div> <p dir="auto">Here too you can accomplish the same directly off of the user:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$user-&gt;allow('ban-users');"><pre><span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>);</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Restricting an ability to a model</h3><a id="user-content-restricting-an-ability-to-a-model" class="anchor" aria-label="Permalink: Restricting an ability to a model" href="#restricting-an-ability-to-a-model"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Sometimes you might want to restrict an ability to a specific model type. Simply pass the model name as a second argument:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow($user)-&gt;to('edit', Post::class);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">edit</span>'</span>, <span class="pl-v">Post</span>::class);</pre></div> <p dir="auto">If you want to restrict the ability to a specific model instance, pass in the actual model instead:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow($user)-&gt;to('edit', $post);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">edit</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>);</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Allowing a user or role to "own" a model</h3><a id="user-content-allowing-a-user-or-role-to-own-a-model" class="anchor" aria-label="Permalink: Allowing a user or role to &quot;own&quot; a model" href="#allowing-a-user-or-role-to-own-a-model"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Use the <code>toOwn</code> method to allow users to manage <em>their own</em> models:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow($user)-&gt;toOwn(Post::class);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toOwn</span>(<span class="pl-v">Post</span>::class);</pre></div> <p dir="auto">Now, when checking at the gate whether the user may perform an action on a given post, the post's <code>user_id</code> will be compared to the logged-in user's <code>id</code> (<a href="#ownership">this can be customized</a>). If they match, the gate will allow the action.</p> <p dir="auto">The above will grant all abilities on a user's "owned" models. You can restrict the abilities by following it up with a call to the <code>to</code> method:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow($user)-&gt;toOwn(Post::class)-&gt;to('view'); // Or pass it an array of abilities: Bouncer::allow($user)-&gt;toOwn(Post::class)-&gt;to(['view', 'update']);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toOwn</span>(<span class="pl-v">Post</span>::class)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">view</span>'</span>); <span class="pl-c">// Or pass it an array of abilities:</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toOwn</span>(<span class="pl-v">Post</span>::class)-&gt;<span class="pl-en">to</span>([<span class="pl-s">'<span class="pl-s">view</span>'</span>, <span class="pl-s">'<span class="pl-s">update</span>'</span>]);</pre></div> <p dir="auto">You can also allow users to own all <em>types</em> of models in your application:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow($user)-&gt;toOwnEverything(); // And to restrict ownership to a given ability Bouncer::allow($user)-&gt;toOwnEverything()-&gt;to('view');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toOwnEverything</span>(); <span class="pl-c">// And to restrict ownership to a given ability</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toOwnEverything</span>()-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">view</span>'</span>);</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Retracting a role from a user</h3><a id="user-content-retracting-a-role-from-a-user" class="anchor" aria-label="Permalink: Retracting a role from a user" href="#retracting-a-role-from-a-user"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The bouncer can also retract a previously-assigned role from a user:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::retract('admin')-&gt;from($user);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">retract</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">from</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>);</pre></div> <p dir="auto">Or do it directly on the user:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$user-&gt;retract('admin');"><pre><span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">retract</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>);</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Removing an ability</h3><a id="user-content-removing-an-ability" class="anchor" aria-label="Permalink: Removing an ability" href="#removing-an-ability"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The bouncer can also remove an ability previously granted to a user:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::disallow($user)-&gt;to('ban-users');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">disallow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>);</pre></div> <p dir="auto">Or directly on the user:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$user-&gt;disallow('ban-users');"><pre><span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">disallow</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>);</pre></div> <blockquote> <p dir="auto"><strong>Note:</strong> if the user has a role that allows them to <code>ban-users</code>, they will still have that ability. To disallow it, either remove the ability from the role or retract the role from the user.</p> </blockquote> <p dir="auto">If the ability has been granted through a role, tell the bouncer to remove the ability from the role instead:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::disallow('admin')-&gt;to('ban-users');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">disallow</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>);</pre></div> <p dir="auto">To remove an ability for a specific model type, pass in its name as a second argument:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::disallow($user)-&gt;to('delete', Post::class);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">disallow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-v">Post</span>::class);</pre></div> <blockquote> <p dir="auto"><strong>Warning:</strong> if the user has an ability to <code>delete</code> a specific <code>$post</code> instance, the code above will <em>not</em> remove that ability. You will have to remove the ability separately - by passing in the actual <code>$post</code> as a second argument - as shown below.</p> </blockquote> <p dir="auto">To remove an ability for a specific model instance, pass in the actual model instead:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::disallow($user)-&gt;to('delete', $post);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">disallow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>);</pre></div> <blockquote> <p dir="auto"><strong>Note</strong>: the <code>disallow</code> method only removes abilities that were previously given to this user/role. If you want to disallow a subset of what a more-general ability has allowed, use <a href="#forbidding-an-ability">the <code>forbid</code> method</a>.</p> </blockquote> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Forbidding an ability</h3><a id="user-content-forbidding-an-ability" class="anchor" aria-label="Permalink: Forbidding an ability" href="#forbidding-an-ability"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Bouncer also allows you to <code>forbid</code> a given ability, for more fine-grained control. At times you may wish to grant a user/role an ability that covers a wide range of actions, but then restrict a small subset of those actions.</p> <p dir="auto">Here are some examples:</p> <ul dir="auto"> <li> <p dir="auto">You might allow a user to generally view all documents, but have a specific highly-classified document that they should not be allowed to view:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow($user)-&gt;to('view', Document::class); Bouncer::forbid($user)-&gt;to('view', $classifiedDocument);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">view</span>'</span>, <span class="pl-v">Document</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">forbid</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">view</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>classifiedDocument</span>);</pre></div> </li> <li> <p dir="auto">You may wish to allow your <code>superadmin</code>s to do everything in your app, including adding/removing users. Then you may have an <code>admin</code> role that can do everything <em>besides</em> managing users:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow('superadmin')-&gt;everything(); Bouncer::allow('admin')-&gt;everything(); Bouncer::forbid('admin')-&gt;toManage(User::class);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">superadmin</span>'</span>)-&gt;<span class="pl-en">everything</span>(); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">everything</span>(); <span class="pl-v">Bouncer</span>::<span class="pl-en">forbid</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">toManage</span>(<span class="pl-v">User</span>::class);</pre></div> </li> <li> <p dir="auto">You may wish to occasionally ban users, removing their permission to all abilities. However, actually removing all of their roles &amp; abilities would mean that when the ban is removed we'll have to figure out what their original roles and abilities were.</p> <p dir="auto">Using a forbidden ability means that they can keep all their existing roles and abilities, but still not be authorized for anything. We can accomplish this by creating a special <code>banned</code> role, for which we'll forbid everything:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::forbid('banned')-&gt;everything();"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">forbid</span>(<span class="pl-s">'<span class="pl-s">banned</span>'</span>)-&gt;<span class="pl-en">everything</span>();</pre></div> <p dir="auto">Then, whenever we want to ban a user, we'll assign them the <code>banned</code> role:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::assign('banned')-&gt;to($user);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">assign</span>(<span class="pl-s">'<span class="pl-s">banned</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>);</pre></div> <p dir="auto">To remove the ban, we'll simply retract the role from the user:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::retract('banned')-&gt;from($user);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">retract</span>(<span class="pl-s">'<span class="pl-s">banned</span>'</span>)-&gt;<span class="pl-en">from</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>);</pre></div> </li> </ul> <p dir="auto">As you can see, Bouncer's forbidden abilities gives you a lot of granular control over the permissions in your app.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Unforbidding an ability</h3><a id="user-content-unforbidding-an-ability" class="anchor" aria-label="Permalink: Unforbidding an ability" href="#unforbidding-an-ability"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">To remove a forbidden ability, use the <code>unforbid</code> method:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::unforbid($user)-&gt;to('view', $classifiedDocument);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">unforbid</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">view</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>classifiedDocument</span>);</pre></div> <blockquote> <p dir="auto"><strong>Note</strong>: this will remove any previously-forbidden ability. It will <em>not</em> authomatically allow the ability if it's not already allowed by a different regular ability granted to this user/role.</p> </blockquote> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Checking a user's roles</h3><a id="user-content-checking-a-users-roles" class="anchor" aria-label="Permalink: Checking a user's roles" href="#checking-a-users-roles"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <blockquote> <p dir="auto"><strong>Note</strong>: Generally speaking, you should not have a need to check roles directly. It is better to allow a role certain abilities, then check for those abilities instead. If what you need is very general, you can create very broad abilities. For example, an <code>access-dashboard</code> ability is always better than checking for <code>admin</code> or <code>editor</code> roles directly. For the rare occasion that you do want to check a role, that functionality is available here.</p> </blockquote> <p dir="auto">The bouncer can check if a user has a specific role:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::is($user)-&gt;a('moderator');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">a</span>(<span class="pl-s">'<span class="pl-s">moderator</span>'</span>);</pre></div> <p dir="auto">If the role you're checking starts with a vowel, you might want to use the <code>an</code> alias method:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::is($user)-&gt;an('admin');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">an</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>);</pre></div> <p dir="auto">For the inverse, you can also check if a user <em>doesn't</em> have a specific role:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::is($user)-&gt;notA('moderator'); Bouncer::is($user)-&gt;notAn('admin');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">notA</span>(<span class="pl-s">'<span class="pl-s">moderator</span>'</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">notAn</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>);</pre></div> <p dir="auto">You can check if a user has one of many roles:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::is($user)-&gt;a('moderator', 'editor');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">a</span>(<span class="pl-s">'<span class="pl-s">moderator</span>'</span>, <span class="pl-s">'<span class="pl-s">editor</span>'</span>);</pre></div> <p dir="auto">You can also check if the user has all of the given roles:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::is($user)-&gt;all('editor', 'moderator');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">all</span>(<span class="pl-s">'<span class="pl-s">editor</span>'</span>, <span class="pl-s">'<span class="pl-s">moderator</span>'</span>);</pre></div> <p dir="auto">You can also check if a user has none of the given roles:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::is($user)-&gt;notAn('editor', 'moderator');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">notAn</span>(<span class="pl-s">'<span class="pl-s">editor</span>'</span>, <span class="pl-s">'<span class="pl-s">moderator</span>'</span>);</pre></div> <p dir="auto">These checks can also be done directly on the user:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$user-&gt;isAn('admin'); $user-&gt;isA('subscriber'); $user-&gt;isNotAn('admin'); $user-&gt;isNotA('subscriber'); $user-&gt;isAll('editor', 'moderator');"><pre><span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isAn</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isA</span>(<span class="pl-s">'<span class="pl-s">subscriber</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isNotAn</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isNotA</span>(<span class="pl-s">'<span class="pl-s">subscriber</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isAll</span>(<span class="pl-s">'<span class="pl-s">editor</span>'</span>, <span class="pl-s">'<span class="pl-s">moderator</span>'</span>);</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Querying users by their roles</h3><a id="user-content-querying-users-by-their-roles" class="anchor" aria-label="Permalink: Querying users by their roles" href="#querying-users-by-their-roles"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">You can query your users by whether they have a given role:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$users = User::whereIs('admin')-&gt;get();"><pre><span class="pl-s1"><span class="pl-c1">$</span>users</span> = <span class="pl-v">User</span>::<span class="pl-en">whereIs</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">get</span>();</pre></div> <p dir="auto">You may also pass in multiple roles, to query for users that have <em>any</em> of the given roles:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$users = User::whereIs('superadmin', 'admin')-&gt;get();"><pre><span class="pl-s1"><span class="pl-c1">$</span>users</span> = <span class="pl-v">User</span>::<span class="pl-en">whereIs</span>(<span class="pl-s">'<span class="pl-s">superadmin</span>'</span>, <span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">get</span>();</pre></div> <p dir="auto">To query for users who have <em>all</em> of the given roles, use the <code>whereIsAll</code> method:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$users = User::whereIsAll('sales', 'marketing')-&gt;get();"><pre><span class="pl-s1"><span class="pl-c1">$</span>users</span> = <span class="pl-v">User</span>::<span class="pl-en">whereIsAll</span>(<span class="pl-s">'<span class="pl-s">sales</span>'</span>, <span class="pl-s">'<span class="pl-s">marketing</span>'</span>)-&gt;<span class="pl-en">get</span>();</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Getting all roles for a user</h3><a id="user-content-getting-all-roles-for-a-user" class="anchor" aria-label="Permalink: Getting all roles for a user" href="#getting-all-roles-for-a-user"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">You can get all roles for a user directly from the user model:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$roles = $user-&gt;getRoles();"><pre><span class="pl-s1"><span class="pl-c1">$</span>roles</span> = <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">getRoles</span>();</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Getting all abilities for a user</h3><a id="user-content-getting-all-abilities-for-a-user" class="anchor" aria-label="Permalink: Getting all abilities for a user" href="#getting-all-abilities-for-a-user"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">You can get all abilities for a user directly from the user model:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$abilities = $user-&gt;getAbilities();"><pre><span class="pl-s1"><span class="pl-c1">$</span>abilities</span> = <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">getAbilities</span>();</pre></div> <p dir="auto">This will return a collection of the user's allowed abilities, including any abilities granted to the user through their roles.</p> <p dir="auto">You can also get a list of abilities that have been <em>explicitly</em> forfidden:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$forbiddenAbilities = $user-&gt;getForbiddenAbilities();"><pre><span class="pl-s1"><span class="pl-c1">$</span>forbiddenAbilities</span> = <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">getForbiddenAbilities</span>();</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Authorizing users</h3><a id="user-content-authorizing-users" class="anchor" aria-label="Permalink: Authorizing users" href="#authorizing-users"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Authorizing users is handled directly at <a href="https://laravel.com/docs/11.x/authorization#gates" rel="nofollow">Laravel's <code>Gate</code></a>, or on the user model (<code>$user-&gt;can($ability)</code>).</p> <p dir="auto">For convenience, the <code>Bouncer</code> class provides these passthrough methods:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::can($ability); Bouncer::can($ability, $model); Bouncer::canAny($abilities); Bouncer::canAny($abilities, $model); Bouncer::cannot($ability); Bouncer::cannot($ability, $model); Bouncer::authorize($ability); Bouncer::authorize($ability, $model);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">can</span>(<span class="pl-s1"><span class="pl-c1">$</span>ability</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">can</span>(<span class="pl-s1"><span class="pl-c1">$</span>ability</span>, <span class="pl-s1"><span class="pl-c1">$</span>model</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">canAny</span>(<span class="pl-s1"><span class="pl-c1">$</span>abilities</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">canAny</span>(<span class="pl-s1"><span class="pl-c1">$</span>abilities</span>, <span class="pl-s1"><span class="pl-c1">$</span>model</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">cannot</span>(<span class="pl-s1"><span class="pl-c1">$</span>ability</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">cannot</span>(<span class="pl-s1"><span class="pl-c1">$</span>ability</span>, <span class="pl-s1"><span class="pl-c1">$</span>model</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">authorize</span>(<span class="pl-s1"><span class="pl-c1">$</span>ability</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">authorize</span>(<span class="pl-s1"><span class="pl-c1">$</span>ability</span>, <span class="pl-s1"><span class="pl-c1">$</span>model</span>);</pre></div> <p dir="auto">These call directly into their equivalent methods on the <code>Gate</code> class.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Blade directives</h3><a id="user-content-blade-directives" class="anchor" aria-label="Permalink: Blade directives" href="#blade-directives"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Bouncer does not add its own blade directives. Since Bouncer works directly with Laravel's gate, simply use its <code>@can</code> directive to check for the current user's abilities:</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@can ('update', $post) &lt;a href=&quot;{{ route('post.update', $post) }}&quot;&gt;Edit Post&lt;/a&gt; @endcan"><pre>@can ('update', $post) <span class="pl-kos">&lt;</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">{{ route('post.update', $post) }}</span>"<span class="pl-kos">&gt;</span>Edit Post<span class="pl-kos">&lt;/</span><span class="pl-ent">a</span><span class="pl-kos">&gt;</span> @endcan</pre></div> <p dir="auto">Since checking for roles directly is generally <a href="#checking-a-users-roles">not recommended</a>, Bouncer does not ship with a separate directive for that. If you still insist on checking for roles, you can do so using the general <code>@if</code> directive:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@if ($user-&gt;isAn('admin')) // @endif"><pre>@<span class="pl-en">if</span> (<span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isAn</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)) // @endif</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Refreshing the cache</h3><a id="user-content-refreshing-the-cache" class="anchor" aria-label="Permalink: Refreshing the cache" href="#refreshing-the-cache"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">All queries executed by Bouncer are cached for the current request. If you enable <a href="#cache">cross-request caching</a>, the cache will persist across different requests.</p> <p dir="auto">Whenever you need, you can fully refresh the bouncer's cache:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::refresh();"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">refresh</span>();</pre></div> <blockquote> <p dir="auto"><strong>Note:</strong> fully refreshing the cache for all users uses <a href="https://laravel.com/docs/11.x/cache#cache-tags" rel="nofollow">cache tags</a> if they're available. Not all cache drivers support this. Refer to <a href="https://laravel.com/docs/11.x/cache#cache-tags" rel="nofollow">Laravel's documentation</a> to see if your driver supports cache tags. If your driver does not support cache tags, calling <code>refresh</code> might be a little slow, depending on the amount of users in your system.</p> </blockquote> <p dir="auto">Alternatively, you can refresh the cache only for a specific user:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::refreshFor($user);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">refreshFor</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>);</pre></div> <blockquote> <p dir="auto"><strong>Note</strong>: When using <a href="#multi-tenancy">multi-tenancy scopes</a>, this will only refresh the cache for the user in the current scope's context. To clear cached data for the same user in a different scope context, it must be called from within that scope.</p> </blockquote> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Multi-tenancy</h2><a id="user-content-multi-tenancy" class="anchor" aria-label="Permalink: Multi-tenancy" href="#multi-tenancy"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Bouncer fully supports multi-tenant apps, allowing you to seamlessly integrate Bouncer's roles and abilities for all tenants within the same app.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">The scope middleware</h3><a id="user-content-the-scope-middleware" class="anchor" aria-label="Permalink: The scope middleware" href="#the-scope-middleware"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">To get started, first publish <a href="https://github.com/JosephSilber/bouncer/blob/master/middleware/ScopeBouncer.php">the scope middleware</a> into your app:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="php artisan vendor:publish --tag=&quot;bouncer.middleware&quot;"><pre class="notranslate"><code>php artisan vendor:publish --tag="bouncer.middleware" </code></pre></div> <p dir="auto">The middleware will now be published to <code>app/Http/Middleware/ScopeBouncer.php</code>. This middleware is where you tell Bouncer which tenant to use for the current request. For example, assuming your users all have an <code>account_id</code> attribute, this is what your middleware would look like:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public function handle($request, Closure $next) { $tenantId = $request-&gt;user()-&gt;account_id; Bouncer::scope()-&gt;to($tenantId); return $next($request); }"><pre><span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">handle</span>(<span class="pl-s1"><span class="pl-c1">$</span>request</span>, <span class="pl-smi"><span class="pl-smi">Closure</span></span> <span class="pl-s1"><span class="pl-c1">$</span>next</span>) { <span class="pl-s1"><span class="pl-c1">$</span>tenantId</span> = <span class="pl-s1"><span class="pl-c1">$</span>request</span>-&gt;<span class="pl-en">user</span>()-&gt;<span class="pl-c1">account_id</span>; <span class="pl-v">Bouncer</span>::<span class="pl-en">scope</span>()-&gt;<span class="pl-en">to</span>(<span class="pl-s1"><span class="pl-c1">$</span>tenantId</span>); <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>next</span>(<span class="pl-s1"><span class="pl-c1">$</span>request</span>); }</pre></div> <p dir="auto">You are of course free to modify this middleware to fit your app's needs, such as pulling the tenant information from a subdomain et al.</p> <p dir="auto">Now with the middleware in place, be sure to register it in your <a href="https://github.com/laravel/laravel/blob/73cff166c79cdeaef1c6b7ec6e71a33a7ea3012d/app/Http/Kernel.php#L30-L38">HTTP Kernel</a>:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="protected $middlewareGroups = [ 'web' =&gt; [ // Keep the existing middleware here, and add this: \App\Http\Middleware\ScopeBouncer::class, ] ];"><pre><span class="pl-k">protected</span> <span class="pl-s1"><span class="pl-c1">$</span>middlewareGroups</span> = [ <span class="pl-s">'<span class="pl-s">web</span>'</span> =&gt; [ <span class="pl-c">// Keep the existing middleware here, and add this:</span> \<span class="pl-v">App</span>\<span class="pl-v">Http</span>\<span class="pl-v">Middleware</span>\<span class="pl-v">ScopeBouncer</span>::class, ] ];</pre></div> <p dir="auto">All of Bouncer's queries will now be scoped to the given tenant.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Customizing Bouncer's scope</h3><a id="user-content-customizing-bouncers-scope" class="anchor" aria-label="Permalink: Customizing Bouncer's scope" href="#customizing-bouncers-scope"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Depending on your app's setup, you may not actually want <em>all</em> of the queries to be scoped to the current tenant. For example, you may have a fixed set of roles/abilities that are the same for all tenants, and only allow your users to control which users are assigned which roles, and which roles have which abilities. To achieve this, you can tell Bouncer's scope to only scope the relationships between Bouncer's models, but not the models themselves:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::scope()-&gt;to($tenantId)-&gt;onlyRelations();"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">scope</span>()-&gt;<span class="pl-en">to</span>(<span class="pl-s1"><span class="pl-c1">$</span>tenantId</span>)-&gt;<span class="pl-en">onlyRelations</span>();</pre></div> <p dir="auto">Furthermore, your app might not even allow its users to control which abilities a given role has. In that case, tell Bouncer's scope to exclude role abilities from the scope, so that those relationships stay global across all tenants:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::scope()-&gt;to($tenantId)-&gt;onlyRelations()-&gt;dontScopeRoleAbilities();"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">scope</span>()-&gt;<span class="pl-en">to</span>(<span class="pl-s1"><span class="pl-c1">$</span>tenantId</span>)-&gt;<span class="pl-en">onlyRelations</span>()-&gt;<span class="pl-en">dontScopeRoleAbilities</span>();</pre></div> <p dir="auto">If your needs are even more specialized than what's outlined above, you can create your own <a href="https://github.com/JosephSilber/bouncer/blob/ab2b92d4d2379be3220daaf0d4185ea10237ff2b/src/Contracts/Scope.php"><code>Scope</code></a> with whatever custom logic you need:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Silber\Bouncer\Contracts\Scope; class MyScope implements Scope { // Whatever custom logic your app needs }"><pre><span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Contracts</span>\<span class="pl-v">Scope</span>; <span class="pl-k">class</span> <span class="pl-v">MyScope</span> <span class="pl-k">implements</span> <span class="pl-v">Scope</span> { <span class="pl-c">// Whatever custom logic your app needs</span> }</pre></div> <p dir="auto">Then, in a service provider, register your custom scope:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::scope(new MyScope);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">scope</span>(<span class="pl-k">new</span> <span class="pl-v">MyScope</span>);</pre></div> <p dir="auto">Bouncer will call the methods on the <code>Scope</code> interface at various points in its execution. You are free to handle them according to your specific needs.</p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Configuration</h2><a id="user-content-configuration" class="anchor" aria-label="Permalink: Configuration" href="#configuration"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Bouncer ships with sensible defaults, so most of the time there should be no need for any configuration. For finer-grained control, Bouncer can be customized by calling various configuration methods on the <code>Bouncer</code> class.</p> <p dir="auto">If you only use one or two of these config options, you can stick them into your <a href="https://github.com/laravel/laravel/blob/e077976680bdb2644698fb8965a1e2a8710b5d4b/app/Providers/AppServiceProvider.php#L24-L27">main <code>AppServiceProvider</code>'s <code>boot</code> method</a>. If they start growing, you may create a separate <code>BouncerServiceProvider</code> class in <a href="https://github.com/laravel/laravel/tree/e077976680bdb2644698fb8965a1e2a8710b5d4b/app/Providers">your <code>app/Providers</code> directory</a> (remember to register it in <a href="https://github.com/laravel/laravel/blob/e077976680bdb2644698fb8965a1e2a8710b5d4b/config/app.php#L171-L178">the <code>providers</code> config array</a>).</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Cache</h3><a id="user-content-cache" class="anchor" aria-label="Permalink: Cache" href="#cache"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">By default, all queries executed by Bouncer are cached for the current request. For better performance, you may want to use cross-request caching:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::cache();"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">cache</span>();</pre></div> <blockquote> <p dir="auto"><strong>Warning:</strong> if you enable cross-request caching, you are responsible to refresh the cache whenever you make changes to user's roles/abilities. For how to refresh the cache, read <a href="#refreshing-the-cache">refreshing the cache</a>.</p> </blockquote> <p dir="auto">On the contrary, you may at times wish to <em>completely disable</em> the cache, even within the same request:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::dontCache();"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">dontCache</span>();</pre></div> <p dir="auto">This is particularly useful in unit tests, when you want to run assertions against roles/abilities that have just been granted.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Tables</h3><a id="user-content-tables" class="anchor" aria-label="Permalink: Tables" href="#tables"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">To change the database table names used by Bouncer, pass an associative array to the <code>tables</code> method. The keys should be Bouncer's default table names, and the values should be the table names you wish to use. You do not have to pass in all tables names; only the ones you wish to change.</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::tables([ 'abilities' =&gt; 'my_abilities', 'permissions' =&gt; 'granted_abilities', ]);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">tables</span>([ <span class="pl-s">'<span class="pl-s">abilities</span>'</span> =&gt; <span class="pl-s">'<span class="pl-s">my_abilities</span>'</span>, <span class="pl-s">'<span class="pl-s">permissions</span>'</span> =&gt; <span class="pl-s">'<span class="pl-s">granted_abilities</span>'</span>, ]);</pre></div> <p dir="auto">Bouncer's published migration uses the table names from this configuration, so be sure to have these in place before actually running the migration.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Custom models</h3><a id="user-content-custom-models" class="anchor" aria-label="Permalink: Custom models" href="#custom-models"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">You can easily extend Bouncer's built-in <code>Role</code> and <code>Ability</code> models:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="namespace App\Models; use Silber\Bouncer\Database\Ability as BouncerAbility; class Ability extends BouncerAbility { // custom code }"><pre><span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">Models</span>; <span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Database</span>\<span class="pl-v">Ability</span> <span class="pl-k">as</span> <span class="pl-v">BouncerAbility</span>; <span class="pl-k">class</span> <span class="pl-v">Ability</span> <span class="pl-k">extends</span> <span class="pl-v">BouncerAbility</span> { <span class="pl-c">// custom code</span> }</pre></div> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="namespace App\Models; use Silber\Bouncer\Database\Role as BouncerRole; class Role extends BouncerRole { // custom code }"><pre><span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">Models</span>; <span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Database</span>\<span class="pl-v">Role</span> <span class="pl-k">as</span> <span class="pl-v">BouncerRole</span>; <span class="pl-k">class</span> <span class="pl-v">Role</span> <span class="pl-k">extends</span> <span class="pl-v">BouncerRole</span> { <span class="pl-c">// custom code</span> }</pre></div> <p dir="auto">Alternatively, you can use Bouncer's <code>IsAbility</code> and <code>IsRole</code> traits without actually extending any of Bouncer's models:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="namespace App\Models; use Illuminate\Database\Eloquent\Model; use Silber\Bouncer\Database\Concerns\IsAbility; class Ability extends Model { use IsAbility; // custom code }"><pre><span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">Models</span>; <span class="pl-k">use</span> <span class="pl-v">Illuminate</span>\<span class="pl-v">Database</span>\<span class="pl-v">Eloquent</span>\<span class="pl-v">Model</span>; <span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Database</span>\<span class="pl-v">Concerns</span>\<span class="pl-v">IsAbility</span>; <span class="pl-k">class</span> <span class="pl-v">Ability</span> <span class="pl-k">extends</span> <span class="pl-v">Model</span> { <span class="pl-k">use</span> <span class="pl-v">IsAbility</span>; <span class="pl-c">// custom code</span> }</pre></div> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="namespace App\Models; use Illuminate\Database\Eloquent\Model; use Silber\Bouncer\Database\Concerns\IsRole; class Role extends Model { use IsRole; // custom code }"><pre><span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">Models</span>; <span class="pl-k">use</span> <span class="pl-v">Illuminate</span>\<span class="pl-v">Database</span>\<span class="pl-v">Eloquent</span>\<span class="pl-v">Model</span>; <span class="pl-k">use</span> <span class="pl-v">Silber</span>\<span class="pl-v">Bouncer</span>\<span class="pl-v">Database</span>\<span class="pl-v">Concerns</span>\<span class="pl-v">IsRole</span>; <span class="pl-k">class</span> <span class="pl-v">Role</span> <span class="pl-k">extends</span> <span class="pl-v">Model</span> { <span class="pl-k">use</span> <span class="pl-v">IsRole</span>; <span class="pl-c">// custom code</span> }</pre></div> <p dir="auto">If you use the traits instead of extending Bouncer's models, be sure to set the proper <code>$table</code> name and <code>$fillable</code> fields yourself.</p> <p dir="auto">Regardless of which method you use, the next step is to actually tell Bouncer to use your custom models:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::useAbilityModel(\App\Models\Ability::class); Bouncer::useRoleModel(\App\Models\Role::class);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">useAbilityModel</span>(\<span class="pl-v">App</span>\<span class="pl-v">Models</span>\<span class="pl-v">Ability</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">useRoleModel</span>(\<span class="pl-v">App</span>\<span class="pl-v">Models</span>\<span class="pl-v">Role</span>::class);</pre></div> <blockquote> <p dir="auto"><strong>Note</strong>: Eloquent determines the foreign key of relationships based on the parent model name (see <a href="https://laravel.com/docs/11.x/eloquent-relationships#one-to-one" rel="nofollow">the Eloquent docs</a>). To keep things simple, name your custom classes the same as Bouncer's: <code>Ability</code> and <code>Role</code>, respectively.</p> <p dir="auto">If you need to use different names, be sure to either update your migration file or override the relationship methods to explicitly set their foreign keys.</p> </blockquote> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">User Model</h3><a id="user-content-user-model" class="anchor" aria-label="Permalink: User Model" href="#user-model"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">By default, Bouncer automatically <a href="https://github.com/JosephSilber/bouncer/blob/462f312/src/BouncerServiceProvider.php#L171-L190">uses the user model of the default auth guard</a>.</p> <p dir="auto">If you're using Bouncer with a non-default guard, and it uses a different user model, you should let Bouncer know about the user model you want to use:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::useUserModel(\App\Admin::class);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">useUserModel</span>(\<span class="pl-v">App</span>\<span class="pl-v">Admin</span>::class);</pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Ownership</h3><a id="user-content-ownership" class="anchor" aria-label="Permalink: Ownership" href="#ownership"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">In Bouncer, the concept of ownership is used to <a href="#allowing-a-user-or-role-to-own-a-model">allow users to perform actions on models they "own"</a>.</p> <p dir="auto">By default, Bouncer will check the model's <code>user_id</code> against the current user's primary key. If needed, this can be set to a different attribute:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::ownedVia('userId');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">ownedVia</span>(<span class="pl-s">'<span class="pl-s">userId</span>'</span>);</pre></div> <p dir="auto">If different models use different columns for ownership, you can register them separately:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::ownedVia(Post::class, 'created_by'); Bouncer::ownedVia(Order::class, 'entered_by');"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">ownedVia</span>(<span class="pl-v">Post</span>::class, <span class="pl-s">'<span class="pl-s">created_by</span>'</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">ownedVia</span>(<span class="pl-v">Order</span>::class, <span class="pl-s">'<span class="pl-s">entered_by</span>'</span>);</pre></div> <p dir="auto">For greater control, you can pass a closure with your custom logic:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::ownedVia(Game::class, function ($game, $user) { return $game-&gt;team_id == $user-&gt;team_id; });"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">ownedVia</span>(<span class="pl-v">Game</span>::class, <span class="pl-k">function</span> (<span class="pl-s1"><span class="pl-c1">$</span>game</span>, <span class="pl-s1"><span class="pl-c1">$</span>user</span>) { <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>game</span>-&gt;<span class="pl-c1">team_id</span> == <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-c1">team_id</span>; });</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">FAQ</h2><a id="user-content-faq" class="anchor" aria-label="Permalink: FAQ" href="#faq"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">There are some concepts in Bouncer that people keep on asking about, so here's a short list of some of those topics:</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Where do I set up my app's roles and abilities?</h3><a id="user-content-where-do-i-set-up-my-apps-roles-and-abilities" class="anchor" aria-label="Permalink: Where do I set up my app's roles and abilities?" href="#where-do-i-set-up-my-apps-roles-and-abilities"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Seeding the initial roles and abilities can be done in a regular <a href="https://laravel.com/docs/11.x/seeding" rel="nofollow">Laravel seeder</a> class. Start by creating a specific seeder file for Bouncer:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="php artisan make:seeder BouncerSeeder"><pre class="notranslate"><code>php artisan make:seeder BouncerSeeder </code></pre></div> <p dir="auto">Place all of your seeding roles &amp; abilities code in <a href="https://github.com/laravel/framework/blob/f50e2004dfa40de895cd841a0a94acef5b417900/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub#L12-L15">the seeder's <code>run</code> method</a>. Here's an example of what that might look like:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Bouncer; use Illuminate\Database\Seeder; class BouncerSeeder extends Seeder { public function run() { Bouncer::allow('superadmin')-&gt;everything(); Bouncer::allow('admin')-&gt;everything(); Bouncer::forbid('admin')-&gt;toManage(User::class); Bouncer::allow('editor')-&gt;to('create', Post::class); Bouncer::allow('editor')-&gt;toOwn(Post::class); // etc. } }"><pre><span class="pl-k">use</span> <span class="pl-v">Bouncer</span>; <span class="pl-k">use</span> <span class="pl-v">Illuminate</span>\<span class="pl-v">Database</span>\<span class="pl-v">Seeder</span>; <span class="pl-k">class</span> <span class="pl-v">BouncerSeeder</span> <span class="pl-k">extends</span> <span class="pl-v">Seeder</span> { <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">run</span>() { <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">superadmin</span>'</span>)-&gt;<span class="pl-en">everything</span>(); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">everything</span>(); <span class="pl-v">Bouncer</span>::<span class="pl-en">forbid</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">toManage</span>(<span class="pl-v">User</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">editor</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">create</span>'</span>, <span class="pl-v">Post</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">editor</span>'</span>)-&gt;<span class="pl-en">toOwn</span>(<span class="pl-v">Post</span>::class); <span class="pl-c">// etc.</span> } }</pre></div> <p dir="auto">To actually run it, pass the seeder's class name to the <code>class</code> option of the <code>db:seed</code> command:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="php artisan db:seed --class=BouncerSeeder"><pre class="notranslate"><code>php artisan db:seed --class=BouncerSeeder </code></pre></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">Can I use a different set of roles &amp; abilities for the public &amp; dashboard sections of my site, respectively?</h3><a id="user-content-can-i-use-a-different-set-of-roles--abilities-for-the-public--dashboard-sections-of-my-site-respectively" class="anchor" aria-label="Permalink: Can I use a different set of roles &amp; abilities for the public &amp; dashboard sections of my site, respectively?" href="#can-i-use-a-different-set-of-roles--abilities-for-the-public--dashboard-sections-of-my-site-respectively"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Bouncer's <a href="#the-scope-middleware"><code>scope</code></a> can be used to section off different parts of the site, creating a silo for each one of them with its own set of roles &amp; abilities:</p> <ol dir="auto"> <li> <p dir="auto">Create a <code>ScopeBouncer</code> <a href="https://laravel.com/docs/11.x/middleware#defining-middleware" rel="nofollow">middleware</a> that takes an <code>$identifier</code> and sets it as the current scope:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Bouncer, Closure; class ScopeBouncer { public function handle($request, Closure $next, $identifier) { Bouncer::scope()-&gt;to($identifier); return $next($request); } }"><pre><span class="pl-k">use</span> <span class="pl-v">Bouncer</span>, <span class="pl-v">Closure</span>; <span class="pl-k">class</span> <span class="pl-v">ScopeBouncer</span> { <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">handle</span>(<span class="pl-s1"><span class="pl-c1">$</span>request</span>, <span class="pl-smi"><span class="pl-smi">Closure</span></span> <span class="pl-s1"><span class="pl-c1">$</span>next</span>, <span class="pl-s1"><span class="pl-c1">$</span>identifier</span>) { <span class="pl-v">Bouncer</span>::<span class="pl-en">scope</span>()-&gt;<span class="pl-en">to</span>(<span class="pl-s1"><span class="pl-c1">$</span>identifier</span>); <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>next</span>(<span class="pl-s1"><span class="pl-c1">$</span>request</span>); } }</pre></div> </li> <li> <p dir="auto">Register this new middleware as a route middleware in your <a href="https://github.com/laravel/laravel/blob/73cff166c79cdeaef1c6b7ec6e71a33a7ea3012d/app/Http/Kernel.php#L53-L60">HTTP Kernel class</a>:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="protected $routeMiddleware = [ // Keep the other route middleware, and add this: 'scope-bouncer' =&gt; \App\Http\Middleware\ScopeBouncer::class, ];"><pre><span class="pl-k">protected</span> <span class="pl-s1"><span class="pl-c1">$</span>routeMiddleware</span> = [ <span class="pl-c">// Keep the other route middleware, and add this:</span> <span class="pl-s">'<span class="pl-s">scope-bouncer</span>'</span> =&gt; \<span class="pl-v">App</span>\<span class="pl-v">Http</span>\<span class="pl-v">Middleware</span>\<span class="pl-v">ScopeBouncer</span>::class, ];</pre></div> </li> <li> <p dir="auto">In your <a href="https://github.com/laravel/laravel/blob/73cff166c79cdeaef1c6b7ec6e71a33a7ea3012d/app/Providers/RouteServiceProvider.php">route service provider</a>, apply this middleware with a different identifier for the public routes and the dashboard routes, respectively:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Route::middleware(['web', 'scope-bouncer:1']) -&gt;namespace($this-&gt;namespace) -&gt;group(base_path('routes/public.php')); Route::middleware(['web', 'scope-bouncer:2']) -&gt;namespace($this-&gt;namespace) -&gt;group(base_path('routes/dashboard.php'));"><pre><span class="pl-v">Route</span>::<span class="pl-en">middleware</span>([<span class="pl-s">'<span class="pl-s">web</span>'</span>, <span class="pl-s">'<span class="pl-s">scope-bouncer:1</span>'</span>]) -&gt;<span class="pl-en">namespace</span>(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">namespace</span>) -&gt;<span class="pl-en">group</span>(<span class="pl-en">base_path</span>(<span class="pl-s">'<span class="pl-s">routes/public.php</span>'</span>)); <span class="pl-v">Route</span>::<span class="pl-en">middleware</span>([<span class="pl-s">'<span class="pl-s">web</span>'</span>, <span class="pl-s">'<span class="pl-s">scope-bouncer:2</span>'</span>]) -&gt;<span class="pl-en">namespace</span>(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">namespace</span>) -&gt;<span class="pl-en">group</span>(<span class="pl-en">base_path</span>(<span class="pl-s">'<span class="pl-s">routes/dashboard.php</span>'</span>));</pre></div> </li> </ol> <p dir="auto">That's it. All roles and abilities will now be separately scoped for each section of your site. To fine-tune the extent of the scope, see <a href="#customizing-bouncers-scope">Customizing Bouncer's scope</a>.</p> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto">I'm trying to run the migration, but I'm getting a SQL error that the "specified key was too long"</h3><a id="user-content-im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-the-specified-key-was-too-long" class="anchor" aria-label="Permalink: I'm trying to run the migration, but I'm getting a SQL error that the &quot;specified key was too long&quot;" href="#im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-the-specified-key-was-too-long"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Starting with Laravel 5.4, the default database character set is now <code>utf8mb4</code>. If you're using older versions of some databases (MySQL below 5.7.7, or MariaDB below 10.2.2) with Laravel 5.4+, you'll get a SQL error when trying to create an index on a string column. To fix this, change Laravel's default string length in your <code>AppServiceProvider</code>:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Illuminate\Support\Facades\Schema; public function boot() { Schema::defaultStringLength(191); }"><pre><span class="pl-k">use</span> <span class="pl-v">Illuminate</span>\<span class="pl-v">Support</span>\<span class="pl-v">Facades</span>\<span class="pl-v">Schema</span>; <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">boot</span>() { <span class="pl-v">Schema</span>::<span class="pl-en">defaultStringLength</span>(<span class="pl-c1">191</span>); }</pre></div> <p dir="auto">You can read more in <a href="https://laravel-news.com/laravel-5-4-key-too-long-error" rel="nofollow">this Laravel News article</a>.</p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">I'm trying to run the migration, but I'm getting a SQL error that there is a "Syntax error or access violation: 1064 ... to use near json not null)"</h2><a id="user-content-im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-there-is-a-syntax-error-or-access-violation-1064--to-use-near-json-not-null" class="anchor" aria-label="Permalink: I'm trying to run the migration, but I'm getting a SQL error that there is a &quot;Syntax error or access violation: 1064 ... to use near json not null)&quot;" href="#im-trying-to-run-the-migration-but-im-getting-a-sql-error-that-there-is-a-syntax-error-or-access-violation-1064--to-use-near-json-not-null"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">JSON columns are a relatively new addition to MySQL (5.7.8) and MariaDB (10.2.7). If you're using an older version of these databases, you cannot use JSON columns.</p> <p dir="auto">The best solution would be to upgrade your DB. If that's not currently possible, you can change <a href="https://github.com/JosephSilber/bouncer/blob/2e31b84e9c1f6c2b86084df2af9d05299ba73c62/migrations/create_bouncer_tables.php#L25">your published migration file</a> to use a <code>text</code> column instead:</p> <div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- $table-&gt;json('options')-&gt;nullable(); + $table-&gt;text('options')-&gt;nullable();"><pre><span class="pl-md"><span class="pl-md">-</span> $table-&gt;json('options')-&gt;nullable();</span> <span class="pl-mi1"><span class="pl-mi1">+</span> $table-&gt;text('options')-&gt;nullable();</span></pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Console commands</h2><a id="user-content-console-commands" class="anchor" aria-label="Permalink: Console commands" href="#console-commands"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <div class="markdown-heading" dir="auto"><h3 tabindex="-1" class="heading-element" dir="auto"><code>bouncer:clean</code></h3><a id="user-content-bouncerclean" class="anchor" aria-label="Permalink: bouncer:clean" href="#bouncerclean"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">The <code>bouncer:clean</code> command deletes unused abilities. Running this command will delete 2 types of unused abilities:</p> <ul dir="auto"> <li> <p dir="auto"><strong>Unassigned abilities</strong> - abilities that are not assigned to anyone. For example:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow($user)-&gt;to('view', Plan::class); Bouncer::disallow($user)-&gt;to('view', Plan::class);"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">view</span>'</span>, <span class="pl-v">Plan</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">disallow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">view</span>'</span>, <span class="pl-v">Plan</span>::class);</pre></div> <p dir="auto">At this point, the "view plans" ability is not assigned to anyone, so it'll get deleted.</p> <blockquote> <p dir="auto"><strong>Note</strong>: depending on the context of your app, you may not want to delete these. If you let your users manage abilities in your app's UI, you probably <em>don't</em> want to delete unassigned abilities. See below.</p> </blockquote> </li> <li> <p dir="auto"><strong>Orphaned abilities</strong> - model abilities whose models have been deleted:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Bouncer::allow($user)-&gt;to('delete', $plan); $plan-&gt;delete();"><pre><span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>plan</span>); <span class="pl-s1"><span class="pl-c1">$</span>plan</span>-&gt;<span class="pl-en">delete</span>();</pre></div> <p dir="auto">Since the plan no longer exists, the ability is no longer of any use, so it'll get deleted.</p> </li> </ul> <p dir="auto">If you only want to delete one type of unused ability, run it with one of the following flags:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="php artisan bouncer:clean --unassigned php artisan bouncer:clean --orphaned"><pre class="notranslate"><code>php artisan bouncer:clean --unassigned php artisan bouncer:clean --orphaned </code></pre></div> <p dir="auto">If you don't pass it any flags, it will delete both types of unused abilities.</p> <p dir="auto">To automatically run this command periodically, add it to <a href="https://laravel.com/docs/11.x/scheduling#defining-schedules" rel="nofollow">your console kernel's schedule</a>:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$schedule-&gt;command('bouncer:clean')-&gt;weekly();"><pre><span class="pl-s1"><span class="pl-c1">$</span>schedule</span>-&gt;<span class="pl-en">command</span>(<span class="pl-s">'<span class="pl-s">bouncer:clean</span>'</span>)-&gt;<span class="pl-en">weekly</span>();</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Cheat Sheet</h2><a id="user-content-cheat-sheet" class="anchor" aria-label="Permalink: Cheat Sheet" href="#cheat-sheet"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Adding abilities for users Bouncer::allow($user)-&gt;to('ban-users'); Bouncer::allow($user)-&gt;to('edit', Post::class); Bouncer::allow($user)-&gt;to('delete', $post); Bouncer::allow($user)-&gt;everything(); Bouncer::allow($user)-&gt;toManage(Post::class); Bouncer::allow($user)-&gt;toManage($post); Bouncer::allow($user)-&gt;to('view')-&gt;everything(); Bouncer::allow($user)-&gt;toOwn(Post::class); Bouncer::allow($user)-&gt;toOwnEverything(); // Removing abilities uses the same syntax, e.g. Bouncer::disallow($user)-&gt;to('delete', $post); Bouncer::disallow($user)-&gt;toManage(Post::class); Bouncer::disallow($user)-&gt;toOwn(Post::class); // Adding &amp; removing abilities for roles Bouncer::allow('admin')-&gt;to('ban-users'); Bouncer::disallow('admin')-&gt;to('ban-users'); // You can also forbid specific abilities with the same syntax... Bouncer::forbid($user)-&gt;to('delete', $post); // And also remove a forbidden ability with the same syntax... Bouncer::unforbid($user)-&gt;to('delete', $post); // Re-syncing a user's abilities Bouncer::sync($user)-&gt;abilities($abilities); // Assigning &amp; retracting roles from users Bouncer::assign('admin')-&gt;to($user); Bouncer::retract('admin')-&gt;from($user); // Assigning roles to multiple users by ID Bouncer::assign('admin')-&gt;to([1, 2, 3]); // Re-syncing a user's roles Bouncer::sync($user)-&gt;roles($roles); // Checking the current user's abilities $boolean = Bouncer::can('ban-users'); $boolean = Bouncer::can('edit', Post::class); $boolean = Bouncer::can('delete', $post); $boolean = Bouncer::cannot('ban-users'); $boolean = Bouncer::cannot('edit', Post::class); $boolean = Bouncer::cannot('delete', $post); // Checking a user's roles $boolean = Bouncer::is($user)-&gt;a('subscriber'); $boolean = Bouncer::is($user)-&gt;an('admin'); $boolean = Bouncer::is($user)-&gt;notA('subscriber'); $boolean = Bouncer::is($user)-&gt;notAn('admin'); $boolean = Bouncer::is($user)-&gt;a('moderator', 'editor'); $boolean = Bouncer::is($user)-&gt;all('moderator', 'editor'); Bouncer::cache(); Bouncer::dontCache(); Bouncer::refresh(); Bouncer::refreshFor($user);"><pre><span class="pl-c">// Adding abilities for users</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">edit</span>'</span>, <span class="pl-v">Post</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">everything</span>(); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toManage</span>(<span class="pl-v">Post</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toManage</span>(<span class="pl-s1"><span class="pl-c1">$</span>post</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">view</span>'</span>)-&gt;<span class="pl-en">everything</span>(); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toOwn</span>(<span class="pl-v">Post</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toOwnEverything</span>(); <span class="pl-c">// Removing abilities uses the same syntax, e.g.</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">disallow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">disallow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toManage</span>(<span class="pl-v">Post</span>::class); <span class="pl-v">Bouncer</span>::<span class="pl-en">disallow</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">toOwn</span>(<span class="pl-v">Post</span>::class); <span class="pl-c">// Adding &amp; removing abilities for roles</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">disallow</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>); <span class="pl-c">// You can also forbid specific abilities with the same syntax...</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">forbid</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>); <span class="pl-c">// And also remove a forbidden ability with the same syntax...</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">unforbid</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>); <span class="pl-c">// Re-syncing a user's abilities</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">sync</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">abilities</span>(<span class="pl-s1"><span class="pl-c1">$</span>abilities</span>); <span class="pl-c">// Assigning &amp; retracting roles from users</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">assign</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">to</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">retract</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">from</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>); <span class="pl-c">// Assigning roles to multiple users by ID</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">assign</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">to</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>]); <span class="pl-c">// Re-syncing a user's roles</span> <span class="pl-v">Bouncer</span>::<span class="pl-en">sync</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">roles</span>(<span class="pl-s1"><span class="pl-c1">$</span>roles</span>); <span class="pl-c">// Checking the current user's abilities</span> <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">can</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">can</span>(<span class="pl-s">'<span class="pl-s">edit</span>'</span>, <span class="pl-v">Post</span>::class); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">can</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">cannot</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">cannot</span>(<span class="pl-s">'<span class="pl-s">edit</span>'</span>, <span class="pl-v">Post</span>::class); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">cannot</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>); <span class="pl-c">// Checking a user's roles</span> <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">a</span>(<span class="pl-s">'<span class="pl-s">subscriber</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">an</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">notA</span>(<span class="pl-s">'<span class="pl-s">subscriber</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">notAn</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">a</span>(<span class="pl-s">'<span class="pl-s">moderator</span>'</span>, <span class="pl-s">'<span class="pl-s">editor</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-v">Bouncer</span>::<span class="pl-en">is</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>)-&gt;<span class="pl-en">all</span>(<span class="pl-s">'<span class="pl-s">moderator</span>'</span>, <span class="pl-s">'<span class="pl-s">editor</span>'</span>); <span class="pl-v">Bouncer</span>::<span class="pl-en">cache</span>(); <span class="pl-v">Bouncer</span>::<span class="pl-en">dontCache</span>(); <span class="pl-v">Bouncer</span>::<span class="pl-en">refresh</span>(); <span class="pl-v">Bouncer</span>::<span class="pl-en">refreshFor</span>(<span class="pl-s1"><span class="pl-c1">$</span>user</span>);</pre></div> <p dir="auto">Some of this functionality is also available directly on the user model:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$user-&gt;allow('ban-users'); $user-&gt;allow('edit', Post::class); $user-&gt;allow('delete', $post); $user-&gt;disallow('ban-users'); $user-&gt;disallow('edit', Post::class); $user-&gt;disallow('delete', $post); $user-&gt;assign('admin'); $user-&gt;retract('admin'); $boolean = $user-&gt;isAn('admin'); $boolean = $user-&gt;isAn('editor', 'moderator'); $boolean = $user-&gt;isAll('moderator', 'editor'); $boolean = $user-&gt;isNotAn('admin', 'moderator'); // Querying users by their roles $users = User::whereIs('superadmin')-&gt;get(); $users = User::whereIs('superadmin', 'admin')-&gt;get(); $users = User::whereIsAll('sales', 'marketing')-&gt;get(); $abilities = $user-&gt;getAbilities(); $forbidden = $user-&gt;getForbiddenAbilities();"><pre><span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">edit</span>'</span>, <span class="pl-v">Post</span>::class); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">allow</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">disallow</span>(<span class="pl-s">'<span class="pl-s">ban-users</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">disallow</span>(<span class="pl-s">'<span class="pl-s">edit</span>'</span>, <span class="pl-v">Post</span>::class); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">disallow</span>(<span class="pl-s">'<span class="pl-s">delete</span>'</span>, <span class="pl-s1"><span class="pl-c1">$</span>post</span>); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">assign</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">retract</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isAn</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isAn</span>(<span class="pl-s">'<span class="pl-s">editor</span>'</span>, <span class="pl-s">'<span class="pl-s">moderator</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isAll</span>(<span class="pl-s">'<span class="pl-s">moderator</span>'</span>, <span class="pl-s">'<span class="pl-s">editor</span>'</span>); <span class="pl-s1"><span class="pl-c1">$</span>boolean</span> = <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">isNotAn</span>(<span class="pl-s">'<span class="pl-s">admin</span>'</span>, <span class="pl-s">'<span class="pl-s">moderator</span>'</span>); <span class="pl-c">// Querying users by their roles</span> <span class="pl-s1"><span class="pl-c1">$</span>users</span> = <span class="pl-v">User</span>::<span class="pl-en">whereIs</span>(<span class="pl-s">'<span class="pl-s">superadmin</span>'</span>)-&gt;<span class="pl-en">get</span>(); <span class="pl-s1"><span class="pl-c1">$</span>users</span> = <span class="pl-v">User</span>::<span class="pl-en">whereIs</span>(<span class="pl-s">'<span class="pl-s">superadmin</span>'</span>, <span class="pl-s">'<span class="pl-s">admin</span>'</span>)-&gt;<span class="pl-en">get</span>(); <span class="pl-s1"><span class="pl-c1">$</span>users</span> = <span class="pl-v">User</span>::<span class="pl-en">whereIsAll</span>(<span class="pl-s">'<span class="pl-s">sales</span>'</span>, <span class="pl-s">'<span class="pl-s">marketing</span>'</span>)-&gt;<span class="pl-en">get</span>(); <span class="pl-s1"><span class="pl-c1">$</span>abilities</span> = <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">getAbilities</span>(); <span class="pl-s1"><span class="pl-c1">$</span>forbidden</span> = <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">getForbiddenAbilities</span>();</pre></div> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">Alternative</h2><a id="user-content-alternative" class="anchor" aria-label="Permalink: Alternative" href="#alternative"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Among the bajillion packages that <a href="https://spatie.be" rel="nofollow">Spatie</a> has so graciously bestowed upon the community, you'll find the excellent <a href="https://github.com/spatie/laravel-permission">laravel-permission</a> package. Like Bouncer, it nicely integrates with Laravel's built-in gate and permission checks, but has a different set of design choices when it comes to syntax, DB structure &amp; features.</p> <div class="markdown-heading" dir="auto"><h2 tabindex="-1" class="heading-element" dir="auto">License</h2><a id="user-content-license" class="anchor" aria-label="Permalink: License" href="#license"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div> <p dir="auto">Bouncer is open-sourced software licensed under the <a href="http://opensource.org/licenses/MIT" rel="nofollow">MIT license</a></p> </article></div></div></div></div></div> <!-- --> <!-- --> <script type="application/json" id="__PRIMER_DATA_:R0:__">{"resolvedServerColorMode":"day"}</script></div> </react-partial> <input type="hidden" data-csrf="true" value="Gz6hLnVlIffcxi9Y8YWZCjOgSTJTba8k9pyiGAmMOYXbkxGPVKw6vh2qppmcjsM16cmkKeEtIBpRYrGnYn3nyg==" /> </div> <div data-view-component="true" class="Layout-sidebar"> <div class="BorderGrid about-margin" data-pjax> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <div class="hide-sm hide-md"> <h2 class="mb-3 h4">About</h2> <p class="f4 my-3"> Laravel Eloquent roles and abilities. </p> <h3 class="sr-only">Topics</h3> <div class="my-3"> <div class="f6"> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:php" href="/topics/php" title="Topic: php" data-view-component="true" class="topic-tag topic-tag-link"> php </a> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:security" href="/topics/security" title="Topic: security" data-view-component="true" class="topic-tag topic-tag-link"> security </a> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:laravel" href="/topics/laravel" title="Topic: laravel" data-view-component="true" class="topic-tag topic-tag-link"> laravel </a> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:eloquent" href="/topics/eloquent" title="Topic: eloquent" data-view-component="true" class="topic-tag topic-tag-link"> eloquent </a> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:permissions" href="/topics/permissions" title="Topic: permissions" data-view-component="true" class="topic-tag topic-tag-link"> permissions </a> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:acl" href="/topics/acl" title="Topic: acl" data-view-component="true" class="topic-tag topic-tag-link"> acl </a> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:auth" href="/topics/auth" title="Topic: auth" data-view-component="true" class="topic-tag topic-tag-link"> auth </a> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:roles" href="/topics/roles" title="Topic: roles" data-view-component="true" class="topic-tag topic-tag-link"> roles </a> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:authorization" href="/topics/authorization" title="Topic: authorization" data-view-component="true" class="topic-tag topic-tag-link"> authorization </a> <a data-ga-click="Topic, repository page" data-octo-click="topic_click" data-octo-dimensions="topic:multitenancy" href="/topics/multitenancy" title="Topic: multitenancy" data-view-component="true" class="topic-tag topic-tag-link"> multitenancy </a> </div> </div> <h3 class="sr-only">Resources</h3> <div class="mt-2"> <a class="Link--muted" data-analytics-event="{&quot;category&quot;:&quot;Repository Overview&quot;,&quot;action&quot;:&quot;click&quot;,&quot;label&quot;:&quot;location:sidebar;file:readme&quot;}" href="#readme-ov-file"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book mr-2"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> Readme </a> </div> <h3 class="sr-only">License</h3> <div class="mt-2"> <a href="#MIT-1-ov-file" class="Link--muted" data-analytics-event="{&quot;category&quot;:&quot;Repository Overview&quot;,&quot;action&quot;:&quot;click&quot;,&quot;label&quot;:&quot;location:sidebar;file:license&quot;}" > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-law mr-2"> <path d="M8.75.75V2h.985c.304 0 .603.08.867.231l1.29.736c.038.022.08.033.124.033h2.234a.75.75 0 0 1 0 1.5h-.427l2.111 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.006.005-.01.01-.045.04c-.21.176-.441.327-.686.45C14.556 10.78 13.88 11 13 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L12.178 4.5h-.162c-.305 0-.604-.079-.868-.231l-1.29-.736a.245.245 0 0 0-.124-.033H8.75V13h2.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.5V3.5h-.984a.245.245 0 0 0-.124.033l-1.289.737c-.265.15-.564.23-.869.23h-.162l2.112 4.692a.75.75 0 0 1-.154.838l-.53-.53.529.531-.001.002-.002.002-.006.006-.016.015-.045.04c-.21.176-.441.327-.686.45C4.556 10.78 3.88 11 3 11a4.498 4.498 0 0 1-2.023-.454 3.544 3.544 0 0 1-.686-.45l-.045-.04-.016-.015-.006-.006-.004-.004v-.001a.75.75 0 0 1-.154-.838L2.178 4.5H1.75a.75.75 0 0 1 0-1.5h2.234a.249.249 0 0 0 .125-.033l1.288-.737c.265-.15.564-.23.869-.23h.984V.75a.75.75 0 0 1 1.5 0Zm2.945 8.477c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327Zm-10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327Z"></path> </svg> MIT license </a> </div> <include-fragment src="/JosephSilber/bouncer/hovercards/citation/sidebar_partial?tree_name=master"> </include-fragment> <div class="mt-2"> <a href="/JosephSilber/bouncer/activity" data-view-component="true" class="Link Link--muted"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pulse mr-2"> <path d="M6 2c.306 0 .582.187.696.471L10 10.731l1.304-3.26A.751.751 0 0 1 12 7h3.25a.75.75 0 0 1 0 1.5h-2.742l-1.812 4.528a.751.751 0 0 1-1.392 0L6 4.77 4.696 8.03A.75.75 0 0 1 4 8.5H.75a.75.75 0 0 1 0-1.5h2.742l1.812-4.529A.751.751 0 0 1 6 2Z"></path> </svg> <span class="color-fg-muted">Activity</span> </a> </div> <h3 class="sr-only">Stars</h3> <div class="mt-2"> <a href="/JosephSilber/bouncer/stargazers" data-view-component="true" class="Link Link--muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg> <strong>3.5k</strong> stars </a> </div> <h3 class="sr-only">Watchers</h3> <div class="mt-2"> <a href="/JosephSilber/bouncer/watchers" data-view-component="true" class="Link Link--muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-eye mr-2"> <path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"></path> </svg> <strong>86</strong> watching </a> </div> <h3 class="sr-only">Forks</h3> <div class="mt-2"> <a href="/JosephSilber/bouncer/forks" data-view-component="true" class="Link Link--muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg> <strong>332</strong> forks </a> </div> <div class="mt-2"> <a class="Link--muted" href="/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2FJosephSilber%2Fbouncer&amp;report=JosephSilber+%28user%29"> Report repository </a> </div> </div> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame"> <a href="/JosephSilber/bouncer/releases" data-view-component="true" class="Link--primary no-underline Link"> Releases <span title="35" data-view-component="true" class="Counter">35</span> </a></h2> <a class="Link--primary d-flex no-underline" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="/JosephSilber/bouncer/releases/tag/v1.0.2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-tag flex-shrink-0 mt-1 color-fg-success"> <path d="M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"></path> </svg> <div class="ml-2 min-width-0"> <div class="d-flex"> <span class="css-truncate css-truncate-target text-bold mr-2" style="max-width: none;">v1.0.2</span> <span title="Label: Latest" data-view-component="true" class="Label Label--success flex-shrink-0"> Latest </span> </div> <div class="text-small color-fg-muted"><relative-time datetime="2024-03-14T14:31:04Z" class="no-wrap">Mar 14, 2024</relative-time></div> </div> </a> <div data-view-component="true" class="mt-3"> <a text="small" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="/JosephSilber/bouncer/releases" data-view-component="true" class="Link"> + 34 releases </a></div> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3"> <a href="/users/JosephSilber/packages?repo_name=bouncer" data-view-component="true" class="Link--primary no-underline Link d-flex flex-items-center"> Packages <span title="0" hidden="hidden" data-view-component="true" class="Counter ml-1">0</span> </a></h2> <div class="text-small color-fg-muted" > No packages published <br> </div> </div> </div> <div class="BorderGrid-row" hidden> <div class="BorderGrid-cell"> <include-fragment src="/JosephSilber/bouncer/used_by_list" accept="text/fragment+html"> </include-fragment> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3"> <a href="/JosephSilber/bouncer/graphs/contributors" data-view-component="true" class="Link--primary no-underline Link d-flex flex-items-center"> Contributors <span title="50" data-view-component="true" class="Counter ml-1">50</span> </a></h2> <ul class="list-style-none d-flex flex-wrap mb-n2"> <li class="mb-2 mr-2" > <a href="https://github.com/JosephSilber" class="" data-hovercard-type="user" data-hovercard-url="/users/JosephSilber/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/1403741?s=64&amp;v=4" alt="@JosephSilber" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/grantholle" class="" data-hovercard-type="user" data-hovercard-url="/users/grantholle/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/1189456?s=64&amp;v=4" alt="@grantholle" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/Keoghan" class="" data-hovercard-type="user" data-hovercard-url="/users/Keoghan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/6714599?s=64&amp;v=4" alt="@Keoghan" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/bkuhl" class="" data-hovercard-type="user" data-hovercard-url="/users/bkuhl/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/524933?s=64&amp;v=4" alt="@bkuhl" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/hailwood" class="" data-hovercard-type="user" data-hovercard-url="/users/hailwood/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/709773?s=64&amp;v=4" alt="@hailwood" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/Procu" class="" data-hovercard-type="user" data-hovercard-url="/users/Procu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/832338?s=64&amp;v=4" alt="@Procu" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/Jeroen-G" class="" data-hovercard-type="user" data-hovercard-url="/users/Jeroen-G/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/1116853?s=64&amp;v=4" alt="@Jeroen-G" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/antonkomarev" class="" data-hovercard-type="user" data-hovercard-url="/users/antonkomarev/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/1849174?s=64&amp;v=4" alt="@antonkomarev" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/ibourgeois" class="" data-hovercard-type="user" data-hovercard-url="/users/ibourgeois/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/3633464?s=64&amp;v=4" alt="@ibourgeois" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/Chrissi2812" class="" data-hovercard-type="user" data-hovercard-url="/users/Chrissi2812/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/6141652?s=64&amp;v=4" alt="@Chrissi2812" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/hootlex" class="" data-hovercard-type="user" data-hovercard-url="/users/hootlex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/6147968?s=64&amp;v=4" alt="@hootlex" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/murrant" class="" data-hovercard-type="user" data-hovercard-url="/users/murrant/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/39462?s=64&amp;v=4" alt="@murrant" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/digital-drifter" class="" data-hovercard-type="user" data-hovercard-url="/users/digital-drifter/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/236768?s=64&amp;v=4" alt="@digital-drifter" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> <li class="mb-2 mr-2" > <a href="https://github.com/mattcrowe" class="" data-hovercard-type="user" data-hovercard-url="/users/mattcrowe/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <img src="https://avatars.githubusercontent.com/u/265644?s=64&amp;v=4" alt="@mattcrowe" size="32" height="32" width="32" data-view-component="true" class="avatar circle" /> </a> </li> </ul> <div data-view-component="true" class="mt-3"> <a text="small" href="/JosephSilber/bouncer/graphs/contributors" data-view-component="true" class="Link--inTextBlock Link"> + 36 contributors </a></div> </div> </div> <div class="BorderGrid-row"> <div class="BorderGrid-cell"> <h2 class="h4 mb-3">Languages</h2> <div class="mb-2"> <span data-view-component="true" class="Progress"> <span style="background-color:#4F5D95 !important;;width: 100.0%;" itemprop="keywords" aria-label="PHP 100.0" data-view-component="true" class="Progress-item color-bg-success-emphasis"></span> </span></div> <ul class="list-style-none"> <li class="d-inline"> <a class="d-inline-flex flex-items-center flex-nowrap Link--secondary no-underline text-small mr-3" href="/JosephSilber/bouncer/search?l=php" data-ga-click="Repository, language stats search click, location:repo overview"> <svg style="color:#4F5D95;" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-dot-fill mr-2"> <path d="M8 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"></path> </svg> <span class="color-fg-default text-bold mr-1">PHP</span> <span>100.0%</span> </a> </li> </ul> </div> </div> </div> </div> </div></div> </div> </div> </turbo-frame> </main> </div> </div> <footer class="footer pt-8 pb-6 f6 color-fg-muted p-responsive" role="contentinfo" > <h2 class='sr-only'>Footer</h2> <div class="d-flex flex-justify-center flex-items-center flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap"> <div class="d-flex flex-items-center flex-shrink-0 mx-2"> <a aria-label="Homepage" title="GitHub" class="footer-octicon mr-2" href="https://github.com"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"></path> </svg> </a> <span> &copy; 2024 GitHub,&nbsp;Inc. </span> </div> <nav aria-label="Footer"> <h3 class="sr-only" id="sr-footer-heading">Footer navigation</h3> <ul class="list-style-none d-flex flex-justify-center flex-wrap mb-2 mb-lg-0" aria-labelledby="sr-footer-heading"> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to Terms&quot;,&quot;label&quot;:&quot;text:terms&quot;}" href="https://docs.github.com/site-policy/github-terms/github-terms-of-service" data-view-component="true" class="Link--secondary Link">Terms</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to privacy&quot;,&quot;label&quot;:&quot;text:privacy&quot;}" href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" data-view-component="true" class="Link--secondary Link">Privacy</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to security&quot;,&quot;label&quot;:&quot;text:security&quot;}" href="https://github.com/security" data-view-component="true" class="Link--secondary Link">Security</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to status&quot;,&quot;label&quot;:&quot;text:status&quot;}" href="https://www.githubstatus.com/" data-view-component="true" class="Link--secondary Link">Status</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to docs&quot;,&quot;label&quot;:&quot;text:docs&quot;}" href="https://docs.github.com/" data-view-component="true" class="Link--secondary Link">Docs</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to contact&quot;,&quot;label&quot;:&quot;text:contact&quot;}" href="https://support.github.com?tags=dotcom-footer" data-view-component="true" class="Link--secondary Link">Contact</a> </li> <li class="mx-2" > <cookie-consent-link> <button type="button" class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent" data-action="click:cookie-consent-link#showConsentManagement" data-analytics-event="{&quot;location&quot;:&quot;footer&quot;,&quot;action&quot;:&quot;cookies&quot;,&quot;context&quot;:&quot;subfooter&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;cookies_link_subfooter_footer&quot;}" > Manage cookies </button> </cookie-consent-link> </li> <li class="mx-2"> <cookie-consent-link> <button type="button" class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent" data-action="click:cookie-consent-link#showConsentManagement" data-analytics-event="{&quot;location&quot;:&quot;footer&quot;,&quot;action&quot;:&quot;dont_share_info&quot;,&quot;context&quot;:&quot;subfooter&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;dont_share_info_link_subfooter_footer&quot;}" > Do not share my personal information </button> </cookie-consent-link> </li> </ul> </nav> </div> </footer> <ghcc-consent id="ghcc" class="position-fixed bottom-0 left-0" style="z-index: 999999" data-initial-cookie-consent-allowed="" data-cookie-consent-required="false"></ghcc-consent> <div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> You can’t perform that action at this time. </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details> </template> <div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div> </div> <template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path> </svg> </clipboard-copy> </div> </template> <template id="snippet-clipboard-copy-button-unpositioned"> <div class="zeroclipboard-container"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path> </svg> </clipboard-copy> </div> </template> </div> <div id="js-global-screen-reader-notice" class="sr-only mt-n1" aria-live="polite" aria-atomic="true" ></div> <div id="js-global-screen-reader-notice-assertive" class="sr-only mt-n1" aria-live="assertive" aria-atomic="true"></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10