Examples of Policies (16)

Short information about policies

Policies are classes that organize authorization logic around a particular model or resource. For example, if your application is a blog, you may have a Post model and a corresponding PostPolicy class to authorize user actions such as creating or updating posts.
Read more in the official Laravel docs.

Repository: koel/koel (Github)
★ 13870 Created: Dec 2015 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Policies/PlaylistPolicy.php
- app/Providers/AuthServiceProvider.php
- app/Http/Controllers/API/PlaylistController.php
Repository: laravelio/laravel.io (Github)
★ 2186 Created: May 2016 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Policies/ArticlePolicy.php
- app/Http/Controllers/Admin/ArticlesController.php
- app/Models/User.php
Repository: iluminar/goodwork (Github)
★ 1799 Created: Nov 2017 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Base/Policies/UserPolicy.php
- app/Base/Http/Controllers/MemberController.php
- app/Base/Providers/AuthServiceProvider.php
- app/Authorization/Authorization.php
Repository: guillaumebriday/laravel-blog (Github)
★ 1503 Created: Dec 2016 Updated: Jun 2022 Laravel version: 8
Files in the example:
- app/Policies/PostPolicy.php
- app/Http/Controllers/Api/V1/PostController.php
Repository: range-of-motion/budget (Github)
★ 781 Created: Jul 2017 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/Policies/EarningPolicy.php
- app/Providers/AuthServiceProvider.php
Repository: serversideup/financial-freedom (Github)
★ 420 Created: Mar 2021 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/Policies/TransactionPolicy.php
- app/Http/Controllers/Web/Transactions/TransactionsController.php
Repository: nafiesl/free-pmo (Github)
★ 362 Created: Nov 2017 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/Providers/AuthServiceProvider.php
- app/Policies/Projects/ProjectPolicy.php
- app/Http/Controllers/Projects/ProjectsController.php
Repository: agorakit/agorakit (Github)
★ 358 Created: May 2016 Updated: Jun 2022 Laravel version: 8
Files in the example:
- app/Policies/CommentPolicy.php
- app/Http/Controllers/CommentController.php
Repository: realodix/urlhub (Github)
★ 316 Created: Aug 2018 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Policies/UrlPolicy.php
- app/Providers/AuthServiceProvider.php
Repository: themsaid/ergodnc (Github)
★ 235 Created: Sep 2021 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/Policies/OfficePolicy.php
- app/Http/Controllers/OfficeController.php
Repository: ilestis/miscellany (Github)
★ 169 Created: Oct 2017 Updated: Aug 2022 Laravel version: 7
Files in the example:
- app/Providers/AuthServiceProvider.php
- app/Policies/CampaignPolicy.php
- app/Policies/EntityPolicy.php
- app/Http/Controllers/Api/v1/EntityInventoryApiController.php
Repository: academico-sis/academico (Github)
★ 126 Created: Dec 2018 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Providers/AuthServiceProvider.php
- app/Models/Policies/ContactPolicy.php
- app/Http/Controllers/ContactController.php
Repository: ammannbe/RecipeManager (Github)
★ 31 Created: Dec 2018 Updated: Aug 2021 Laravel version: 8
Files in the example:
- app/Policies/Ingredients/IngredientGroupPolicy.php
- app/Providers/AuthServiceProvider.php
- app/Http/Controllers/Ingredients/IngredientGroupController.php
Repository: devhub-az/devhub (Github)
★ 23 Created: Dec 2019 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/Policies/AuthorPolicy.php
- app/Providers/AuthServiceProvider.php
- app/Http/Controllers/Admin/UsersController.php
Repository: Melcus/parking-system (Github)
★ 7 Created: May 2021 Updated: Feb 2022 Laravel version: 8
Files in the example:
- app/Policies/ReservationPolicy.php
- app/Http/Requests/CalculatePaymentRequest.php
Repository: Ayenko4all/school-management-system-backend (Github)
★ 6 Created: Aug 2021 Updated: Nov 2021 Laravel version: 8
Files in the example:
- app/Policies/TeacherPolicy.php
- app/Http/Controllers/Teacher/TeacherController.php

Additional resources on policies: