├── .editorconfig ├── .env.example ├── .gitattributes ├── .github ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE.md ├── stale.yml └── workflows │ └── main.yml ├── .gitignore ├── .php_cs ├── .styleci.yml ├── README.md ├── app ├── Console │ └── Kernel.php ├── Domains │ ├── Announcement │ │ ├── Models │ │ │ ├── Announcement.php │ │ │ └── Traits │ │ │ │ └── Scope │ │ │ │ └── AnnouncementScope.php │ │ └── Services │ │ │ └── AnnouncementService.php │ └── Auth │ │ ├── Events │ │ ├── Role │ │ │ ├── RoleCreated.php │ │ │ ├── RoleDeleted.php │ │ │ └── RoleUpdated.php │ │ └── User │ │ │ ├── UserCreated.php │ │ │ ├── UserDeleted.php │ │ │ ├── UserDestroyed.php │ │ │ ├── UserLoggedIn.php │ │ │ ├── UserRestored.php │ │ │ ├── UserStatusChanged.php │ │ │ └── UserUpdated.php │ │ ├── Http │ │ ├── Controllers │ │ │ ├── Backend │ │ │ │ ├── Role │ │ │ │ │ └── RoleController.php │ │ │ │ └── User │ │ │ │ │ ├── DeactivatedUserController.php │ │ │ │ │ ├── DeletedUserController.php │ │ │ │ │ ├── UserController.php │ │ │ │ │ ├── UserPasswordController.php │ │ │ │ │ └── UserSessionController.php │ │ │ └── Frontend │ │ │ │ └── Auth │ │ │ │ ├── ConfirmPasswordController.php │ │ │ │ ├── DisableTwoFactorAuthenticationController.php │ │ │ │ ├── ForgotPasswordController.php │ │ │ │ ├── LoginController.php │ │ │ │ ├── PasswordExpiredController.php │ │ │ │ ├── RegisterController.php │ │ │ │ ├── ResetPasswordController.php │ │ │ │ ├── SocialController.php │ │ │ │ ├── TwoFactorAuthenticationController.php │ │ │ │ ├── UpdatePasswordController.php │ │ │ │ └── VerificationController.php │ │ ├── Middleware │ │ │ ├── AdminCheck.php │ │ │ ├── PasswordExpires.php │ │ │ ├── SuperAdminCheck.php │ │ │ ├── ToBeLoggedOut.php │ │ │ ├── TwoFactorAuthenticationStatus.php │ │ │ ├── UserCheck.php │ │ │ └── UserTypeCheck.php │ │ └── Requests │ │ │ ├── Backend │ │ │ ├── Role │ │ │ │ ├── DeleteRoleRequest.php │ │ │ │ ├── EditRoleRequest.php │ │ │ │ ├── StoreRoleRequest.php │ │ │ │ └── UpdateRoleRequest.php │ │ │ └── User │ │ │ │ ├── ClearUserSessionRequest.php │ │ │ │ ├── DeleteUserRequest.php │ │ │ │ ├── EditUserPasswordRequest.php │ │ │ │ ├── EditUserRequest.php │ │ │ │ ├── StoreUserRequest.php │ │ │ │ ├── UpdateUserPasswordRequest.php │ │ │ │ └── UpdateUserRequest.php │ │ │ └── Frontend │ │ │ └── Auth │ │ │ ├── DisableTwoFactorAuthenticationRequest.php │ │ │ └── UpdatePasswordRequest.php │ │ ├── Listeners │ │ ├── RoleEventListener.php │ │ └── UserEventListener.php │ │ ├── Models │ │ ├── PasswordHistory.php │ │ ├── Permission.php │ │ ├── Role.php │ │ ├── Traits │ │ │ ├── Attribute │ │ │ │ ├── RoleAttribute.php │ │ │ │ └── UserAttribute.php │ │ │ ├── Method │ │ │ │ ├── RoleMethod.php │ │ │ │ └── UserMethod.php │ │ │ ├── Relationship │ │ │ │ ├── PermissionRelationship.php │ │ │ │ └── UserRelationship.php │ │ │ └── Scope │ │ │ │ ├── PermissionScope.php │ │ │ │ ├── RoleScope.php │ │ │ │ └── UserScope.php │ │ └── User.php │ │ ├── Notifications │ │ └── Frontend │ │ │ ├── ResetPasswordNotification.php │ │ │ └── VerifyEmail.php │ │ ├── Observers │ │ └── UserObserver.php │ │ ├── Rules │ │ └── UnusedPassword.php │ │ └── Services │ │ ├── PermissionService.php │ │ ├── RoleService.php │ │ └── UserService.php ├── Exceptions │ ├── GeneralException.php │ ├── Handler.php │ └── ReportableException.php ├── Helpers │ └── Global │ │ ├── GeneralHelper.php │ │ ├── HtmlHelper.php │ │ ├── LocaleHelper.php │ │ ├── SystemHelper.php │ │ ├── TimezoneHelper.php │ │ └── _readme.txt ├── Http │ ├── Controllers │ │ ├── Backend │ │ │ └── DashboardController.php │ │ ├── Controller.php │ │ ├── Frontend │ │ │ ├── HomeController.php │ │ │ ├── TermsController.php │ │ │ └── User │ │ │ │ ├── AccountController.php │ │ │ │ ├── DashboardController.php │ │ │ │ └── ProfileController.php │ │ └── LocaleController.php │ ├── Kernel.php │ ├── Livewire │ │ ├── Backend │ │ │ ├── RolesTable.php │ │ │ └── UsersTable.php │ │ └── Frontend │ │ │ └── TwoFactorAuthentication.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── EncryptCookies.php │ │ ├── LocaleMiddleware.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ └── Frontend │ │ └── User │ │ └── UpdateProfileRequest.php ├── Models │ └── Traits │ │ └── Uuid.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BladeServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── ComposerServiceProvider.php │ ├── EventServiceProvider.php │ ├── HelperServiceProvider.php │ ├── LocaleServiceProvider.php │ ├── ObserverServiceProvider.php │ └── RouteServiceProvider.php ├── Rules │ └── Captcha.php └── Services │ └── BaseService.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── activitylog.php ├── app.php ├── auth.php ├── boilerplate.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── geoip.php ├── hashing.php ├── livewire-tables.php ├── livewire.php ├── lockout.php ├── log-viewer.php ├── logging.php ├── mail.php ├── permission.php ├── queue.php ├── sanctum.php ├── services.php ├── session.php ├── timezone.php └── view.php ├── database ├── .gitignore ├── factories │ ├── AnnouncementFactory.php │ ├── RoleFactory.php │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ ├── 2020_02_25_034148_create_permission_tables.php │ ├── 2020_05_25_021239_create_announcements_table.php │ ├── 2020_05_29_020244_create_password_histories_table.php │ ├── 2020_07_06_215139_create_activity_log_table.php │ └── 2021_04_05_153840_create_two_factor_authentications_table.php └── seeders │ ├── AnnouncementSeeder.php │ ├── Auth │ ├── PermissionRoleSeeder.php │ ├── UserRoleSeeder.php │ └── UserSeeder.php │ ├── AuthSeeder.php │ ├── DatabaseSeeder.php │ └── Traits │ ├── DisableForeignKeys.php │ └── TruncateTable.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── favicon.ico ├── img │ └── brand │ │ └── coreui.svg ├── index.php ├── robots.txt └── web.config ├── resources ├── js │ ├── backend │ │ └── app.js │ ├── bootstrap.js │ ├── frontend │ │ ├── app.js │ │ └── components │ │ │ └── ExampleComponent.vue │ └── plugins.js ├── lang │ ├── ar.json │ ├── ar │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── az.json │ ├── az │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── cs.json │ ├── cs │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── da.json │ ├── da │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── de.json │ ├── de │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── el.json │ ├── el │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── es.json │ ├── es │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── fa.json │ ├── fa │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── fr.json │ ├── fr │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── he.json │ ├── he │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── id.json │ ├── id │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── it.json │ ├── it │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── ja.json │ ├── ja │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── ko.json │ ├── ko │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── nl.json │ ├── nl │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── no.json │ ├── no │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── pl.json │ ├── pl │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── pt_BR.json │ ├── pt_BR │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── pt_PT.json │ ├── pt_PT │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── ro.json │ ├── ro │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── ru.json │ ├── ru │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── sv.json │ ├── sv │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── th.json │ ├── th │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── tr.json │ ├── tr │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── uk.json │ ├── uk │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── vi.json │ ├── vi │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── zh-TW.json │ ├── zh-TW │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── zh.json │ └── zh │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── sass │ ├── _global.scss │ ├── backend │ │ └── app.scss │ └── frontend │ │ ├── _global.scss │ │ ├── _variables.scss │ │ └── app.scss └── views │ ├── backend │ ├── auth │ │ ├── includes │ │ │ ├── partials │ │ │ │ ├── permission-type.blade.php │ │ │ │ └── role-type.blade.php │ │ │ ├── permissions.blade.php │ │ │ └── roles.blade.php │ │ ├── role │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── includes │ │ │ │ ├── actions.blade.php │ │ │ │ ├── children.blade.php │ │ │ │ ├── no-permissions-message.blade.php │ │ │ │ └── row.blade.php │ │ │ └── index.blade.php │ │ └── user │ │ │ ├── change-password.blade.php │ │ │ ├── create.blade.php │ │ │ ├── deactivated.blade.php │ │ │ ├── deleted.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── includes │ │ │ ├── 2fa.blade.php │ │ │ ├── actions.blade.php │ │ │ ├── breadcrumb-links.blade.php │ │ │ ├── row.blade.php │ │ │ ├── status.blade.php │ │ │ ├── type.blade.php │ │ │ └── verified.blade.php │ │ │ ├── index.blade.php │ │ │ └── show.blade.php │ ├── dashboard.blade.php │ ├── includes │ │ ├── footer.blade.php │ │ ├── header.blade.php │ │ ├── partials │ │ │ └── breadcrumbs.blade.php │ │ └── sidebar.blade.php │ └── layouts │ │ └── app.blade.php │ ├── components │ ├── backend │ │ └── card.blade.php │ ├── forms │ │ ├── delete.blade.php │ │ ├── get.blade.php │ │ ├── patch.blade.php │ │ └── post.blade.php │ ├── frontend │ │ ├── card.blade.php │ │ └── two-factor-authentication.blade.php │ └── utils │ │ ├── alert.blade.php │ │ ├── delete-button.blade.php │ │ ├── edit-button.blade.php │ │ ├── form-button.blade.php │ │ ├── link.blade.php │ │ └── view-button.blade.php │ ├── errors │ ├── 401.blade.php │ ├── 403.blade.php │ ├── 404.blade.php │ ├── 419.blade.php │ ├── 429.blade.php │ ├── 500.blade.php │ └── 503.blade.php │ ├── frontend │ ├── auth │ │ ├── includes │ │ │ └── social.blade.php │ │ ├── login.blade.php │ │ ├── passwords │ │ │ ├── confirm.blade.php │ │ │ ├── email.blade.php │ │ │ ├── expired.blade.php │ │ │ └── reset.blade.php │ │ ├── register.blade.php │ │ └── verify.blade.php │ ├── includes │ │ ├── nav.blade.php │ │ └── partials │ │ │ └── breadcrumbs.blade.php │ ├── index.blade.php │ ├── layouts │ │ └── app.blade.php │ ├── pages │ │ └── terms.blade.php │ └── user │ │ ├── account.blade.php │ │ ├── account │ │ └── tabs │ │ │ ├── information.blade.php │ │ │ ├── password.blade.php │ │ │ ├── profile.blade.php │ │ │ ├── two-factor-authentication.blade.php │ │ │ └── two-factor-authentication │ │ │ ├── disable.blade.php │ │ │ ├── enable.blade.php │ │ │ └── recovery.blade.php │ │ └── dashboard.blade.php │ ├── includes │ └── partials │ │ ├── announcements.blade.php │ │ ├── lang.blade.php │ │ ├── logged-in-as.blade.php │ │ ├── messages.blade.php │ │ └── read-only.blade.php │ └── vendor │ ├── laraguard │ └── auth.blade.php │ └── log-viewer │ └── bootstrap-4 │ └── _master.blade.php ├── routes ├── api.php ├── backend │ ├── admin.php │ └── auth.php ├── channels.php ├── console.php ├── frontend │ ├── auth.php │ ├── home.php │ └── user.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── debugbar │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ ├── Backend │ │ ├── DashboardTest.php │ │ ├── Role │ │ │ ├── CreateRoleTest.php │ │ │ ├── DeleteRoleTest.php │ │ │ ├── ListRoleTest.php │ │ │ └── UpdateRoleTest.php │ │ └── User │ │ │ ├── ChangeUserPasswordTest.php │ │ │ ├── ClearSessionTest.php │ │ │ ├── CreateUserTest.php │ │ │ ├── DeactivateReactivateUserTest.php │ │ │ ├── DeleteUserTest.php │ │ │ ├── ListUserTest.php │ │ │ └── UpdateUserTest.php │ ├── Frontend │ │ ├── AnnouncementTest.php │ │ ├── ChangePasswordTest.php │ │ ├── ConfirmationTest.php │ │ ├── DashboardTest.php │ │ ├── HomeTest.php │ │ ├── LoginTest.php │ │ ├── LogoutTest.php │ │ ├── PasswordExpirationTest.php │ │ ├── RegistrationTest.php │ │ ├── ResetPasswordTest.php │ │ ├── UserAccountTest.php │ │ └── VerificationTest.php │ └── Middleware │ │ ├── SwitchLanguageTest.php │ │ └── ToBeLoggedOutTest.php └── TestCase.php ├── webpack.mix.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | # Enforce Unix newlines 4 | *.css text eol=lf linguist-vendored 5 | *.html text eol=lf 6 | *.js text eol=lf linguist-vendored 7 | *.json text eol=lf 8 | *.md text eol=lf 9 | *.scss text eol=lf linguist-vendored 10 | *.svg text eol=lf 11 | *.txt text eol=lf 12 | *.xml text eol=lf 13 | *.yml text eol=lf 14 | 15 | # Don't diff or textually merge source maps 16 | *.map binary 17 | 18 | CHANGELOG.md export-ignore 19 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [rappasoft] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Before you create an issue make sure that: 2 | - Your issue is **strictly related to the boilerplate** itself. Questions about Laravel in general belongs to the [laravel](http://laravel.io/forum) or [laracasts](https://laracasts.com/discuss/) forums. 3 | - You have read the [documentation](https://laravel-boilerplate.com) thoroughly. 4 | - You have searched for a similar issue among all the former issues (even closed ones). 5 | - You have tried to replicate the issue with a clean install of the project. 6 | 7 | # Be explicit 8 | Try to be as explicit as you can when you ask anything. 9 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 30 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: wontfix 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /coverage 2 | /node_modules 3 | /public/css 4 | /public/js 5 | /public/fonts 6 | /public/hot 7 | /public/storage 8 | /public/mix-manifest.json 9 | /storage/*.key 10 | /vendor 11 | /.vscode 12 | *.sublime-project 13 | *.sublime-workspace 14 | _ide_helper.php 15 | .DS_Store 16 | .env 17 | .env.backup 18 | .idea 19 | .php_cs.cache 20 | .phpunit.result.cache 21 | .phpstorm.meta.php 22 | .project 23 | composer.phar 24 | coverage.xml 25 | docker-compose.override.yml 26 | error.log 27 | Homestead.json 28 | Homestead.yaml 29 | npm-debug.log 30 | output.txt 31 | Thumbs.db 32 | yarn-error.log 33 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | preset: laravel 2 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('activitylog:clean')->daily(); 31 | } 32 | 33 | /** 34 | * Register the commands for the application. 35 | * 36 | * @return void 37 | */ 38 | protected function commands() 39 | { 40 | $this->load(__DIR__.'/Commands'); 41 | 42 | require base_path('routes/console.php'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/Role/RoleCreated.php: -------------------------------------------------------------------------------- 1 | role = $role; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/Role/RoleDeleted.php: -------------------------------------------------------------------------------- 1 | role = $role; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/Role/RoleUpdated.php: -------------------------------------------------------------------------------- 1 | role = $role; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/User/UserCreated.php: -------------------------------------------------------------------------------- 1 | user = $user; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/User/UserDeleted.php: -------------------------------------------------------------------------------- 1 | user = $user; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/User/UserDestroyed.php: -------------------------------------------------------------------------------- 1 | user = $user; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/User/UserLoggedIn.php: -------------------------------------------------------------------------------- 1 | user = $user; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/User/UserRestored.php: -------------------------------------------------------------------------------- 1 | user = $user; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/User/UserStatusChanged.php: -------------------------------------------------------------------------------- 1 | user = $user; 34 | $this->status = $status; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Domains/Auth/Events/User/UserUpdated.php: -------------------------------------------------------------------------------- 1 | user = $user; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Controllers/Backend/User/UserSessionController.php: -------------------------------------------------------------------------------- 1 | update(['to_be_logged_out' => true]); 21 | 22 | return redirect()->back()->withFlashSuccess(__('The user\'s session was successfully cleared.')); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Controllers/Frontend/Auth/ConfirmPasswordController.php: -------------------------------------------------------------------------------- 1 | user()->disableTwoFactorAuth(); 27 | 28 | return redirect()->route('frontend.user.account', ['#two-factor-authentication'])->withFlashSuccess(__('Two Factor Authentication Successfully Disabled')); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Controllers/Frontend/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | updatePassword($request->user(), $request->only('old_password', 'password'), true); 35 | 36 | return redirect()->route('frontend.user.account') 37 | ->withFlashSuccess(__('Password successfully updated.')); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Controllers/Frontend/Auth/SocialController.php: -------------------------------------------------------------------------------- 1 | redirect(); 21 | } 22 | 23 | /** 24 | * @param $provider 25 | * @param UserService $userService 26 | * @return \Illuminate\Http\RedirectResponse 27 | * 28 | * @throws \App\Exceptions\GeneralException 29 | */ 30 | public function callback($provider, UserService $userService) 31 | { 32 | $user = $userService->registerProvider(Socialite::driver($provider)->user(), $provider); 33 | 34 | if (! $user->isActive()) { 35 | auth()->logout(); 36 | 37 | return redirect()->route('frontend.auth.login')->withFlashDanger(__('Your account has been deactivated.')); 38 | } 39 | 40 | auth()->login($user); 41 | 42 | event(new UserLoggedIn($user)); 43 | 44 | return redirect()->route(homeRoute()); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Controllers/Frontend/Auth/UpdatePasswordController.php: -------------------------------------------------------------------------------- 1 | userService = $userService; 26 | } 27 | 28 | /** 29 | * @param UpdatePasswordRequest $request 30 | * @return mixed 31 | * 32 | * @throws \Throwable 33 | */ 34 | public function update(UpdatePasswordRequest $request) 35 | { 36 | $this->userService->updatePassword($request->user(), $request->validated()); 37 | 38 | return redirect()->route('frontend.user.account', ['#password'])->withFlashSuccess(__('Password successfully updated.')); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Middleware/AdminCheck.php: -------------------------------------------------------------------------------- 1 | user() && $request->user()->isType(User::TYPE_ADMIN)) { 21 | return $next($request); 22 | } 23 | 24 | return redirect()->route('frontend.index')->withFlashDanger(__('You do not have access to do that.')); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Middleware/PasswordExpires.php: -------------------------------------------------------------------------------- 1 | user()->password_changed_at ?? $request->user()->created_at); 24 | 25 | if (now()->diffInDays($password_changed_at) >= config('boilerplate.access.user.password_expires_days')) { 26 | return redirect() 27 | ->route('frontend.auth.password.expired') 28 | ->withFlashWarning(__('Your password has expired. We require you to change your password every :days days for security purposes.', [ 29 | 'days' => config('boilerplate.access.user.password_expires_days'), 30 | ])); 31 | } 32 | } 33 | 34 | return $next($request); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Middleware/SuperAdminCheck.php: -------------------------------------------------------------------------------- 1 | user() && $request->user()->hasAllAccess()) { 20 | return $next($request); 21 | } 22 | 23 | return redirect()->route('frontend.index')->withFlashDanger(__('You do not have access to do that.')); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Middleware/ToBeLoggedOut.php: -------------------------------------------------------------------------------- 1 | user() && $request->user()->to_be_logged_out) { 21 | // Make sure they can log back in next session 22 | $request->user()->update(['to_be_logged_out' => false]); 23 | 24 | // Kill the current session and force back to the login screen 25 | session()->flush(); 26 | auth()->logout(); 27 | 28 | return redirect()->route('frontend.auth.login'); 29 | } 30 | 31 | return $next($request); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Middleware/TwoFactorAuthenticationStatus.php: -------------------------------------------------------------------------------- 1 | is('admin*') && ! config('boilerplate.access.user.admin_requires_2fa')) { 26 | return $next($request); 27 | } 28 | 29 | // Page requires 2fa, but user is not enabled or page does not require 2fa, but it is enabled 30 | if ( 31 | ($status === 'enabled' && ! $request->user()->hasTwoFactorEnabled()) || 32 | ($status === 'disabled' && $request->user()->hasTwoFactorEnabled()) 33 | ) { 34 | return redirect()->route('frontend.auth.account.2fa.create')->withFlashDanger(__('Two-factor Authentication must be :status to view this page.', ['status' => $status])); 35 | } 36 | 37 | return $next($request); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Middleware/UserCheck.php: -------------------------------------------------------------------------------- 1 | user() && $request->user()->isType(User::TYPE_USER)) { 21 | return $next($request); 22 | } 23 | 24 | return redirect()->route('frontend.index')->withFlashDanger(__('You do not have access to do that.')); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Middleware/UserTypeCheck.php: -------------------------------------------------------------------------------- 1 | user()) { 21 | if (strpos($type, '|') !== false) { 22 | $types = explode('|', $type); 23 | 24 | foreach ($types as $t) { 25 | if ($request->user()->isType($t)) { 26 | return $next($request); 27 | } 28 | } 29 | } elseif ($request->user()->isType($type)) { 30 | return $next($request); 31 | } 32 | } 33 | 34 | return redirect()->route('frontend.index')->withFlashDanger(__('You do not have access to do that.')); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Requests/Backend/Role/DeleteRoleRequest.php: -------------------------------------------------------------------------------- 1 | role->isAdmin(); 21 | } 22 | 23 | /** 24 | * Get the validation rules that apply to the request. 25 | * 26 | * @return array 27 | */ 28 | public function rules() 29 | { 30 | return [ 31 | // 32 | ]; 33 | } 34 | 35 | /** 36 | * Handle a failed authorization attempt. 37 | * 38 | * @return void 39 | * 40 | * @throws \Illuminate\Auth\Access\AuthorizationException 41 | */ 42 | protected function failedAuthorization() 43 | { 44 | throw new AuthorizationException(__('You can not delete the Administrator role.')); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Requests/Backend/Role/EditRoleRequest.php: -------------------------------------------------------------------------------- 1 | role->isAdmin(); 21 | } 22 | 23 | /** 24 | * Get the validation rules that apply to the request. 25 | * 26 | * @return array 27 | */ 28 | public function rules() 29 | { 30 | return [ 31 | // 32 | ]; 33 | } 34 | 35 | /** 36 | * Handle a failed authorization attempt. 37 | * 38 | * @return void 39 | * 40 | * @throws \Illuminate\Auth\Access\AuthorizationException 41 | */ 42 | protected function failedAuthorization() 43 | { 44 | throw new AuthorizationException(__('You can not edit the Administrator role.')); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Requests/Backend/Role/StoreRoleRequest.php: -------------------------------------------------------------------------------- 1 | ['required', Rule::in([User::TYPE_ADMIN, User::TYPE_USER])], 33 | 'name' => ['required', 'max:100', Rule::unique('roles')], 34 | 'permissions' => ['sometimes', 'array'], 35 | 'permissions.*' => [Rule::exists('permissions', 'id')->where('type', $this->type)], 36 | ]; 37 | } 38 | 39 | /** 40 | * @return array 41 | */ 42 | public function messages() 43 | { 44 | return [ 45 | 'permissions.*.exists' => __('One or more permissions were not found or are not allowed to be associated with this role type.'), 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Requests/Backend/User/ClearUserSessionRequest.php: -------------------------------------------------------------------------------- 1 | user->id !== $this->user()->id; 21 | } 22 | 23 | /** 24 | * Get the validation rules that apply to the request. 25 | * 26 | * @return array 27 | */ 28 | public function rules() 29 | { 30 | return [ 31 | // 32 | ]; 33 | } 34 | 35 | /** 36 | * Handle a failed authorization attempt. 37 | * 38 | * @return void 39 | * 40 | * @throws \Illuminate\Auth\Access\AuthorizationException 41 | */ 42 | protected function failedAuthorization() 43 | { 44 | throw new AuthorizationException(__('You can not clear your own session.')); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Requests/Backend/User/DeleteUserRequest.php: -------------------------------------------------------------------------------- 1 | user->isMasterAdmin(); 21 | } 22 | 23 | /** 24 | * Get the validation rules that apply to the request. 25 | * 26 | * @return array 27 | */ 28 | public function rules() 29 | { 30 | return [ 31 | // 32 | ]; 33 | } 34 | 35 | /** 36 | * Handle a failed authorization attempt. 37 | * 38 | * @return void 39 | * 40 | * @throws \Illuminate\Auth\Access\AuthorizationException 41 | */ 42 | protected function failedAuthorization() 43 | { 44 | throw new AuthorizationException(__('You can not delete the master administrator.')); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Requests/Backend/User/EditUserPasswordRequest.php: -------------------------------------------------------------------------------- 1 | user->isMasterAdmin() && ! $this->user()->isMasterAdmin()); 21 | } 22 | 23 | /** 24 | * Get the validation rules that apply to the request. 25 | * 26 | * @return array 27 | */ 28 | public function rules() 29 | { 30 | return [ 31 | // 32 | ]; 33 | } 34 | 35 | /** 36 | * Handle a failed authorization attempt. 37 | * 38 | * @return void 39 | * 40 | * @throws \Illuminate\Auth\Access\AuthorizationException 41 | */ 42 | protected function failedAuthorization() 43 | { 44 | throw new AuthorizationException(__('Only the administrator can change their password.')); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Requests/Backend/User/EditUserRequest.php: -------------------------------------------------------------------------------- 1 | user->isMasterAdmin() && ! $this->user()->isMasterAdmin()); 21 | } 22 | 23 | /** 24 | * Get the validation rules that apply to the request. 25 | * 26 | * @return array 27 | */ 28 | public function rules() 29 | { 30 | return [ 31 | // 32 | ]; 33 | } 34 | 35 | /** 36 | * Handle a failed authorization attempt. 37 | * 38 | * @return void 39 | * 40 | * @throws \Illuminate\Auth\Access\AuthorizationException 41 | */ 42 | protected function failedAuthorization() 43 | { 44 | throw new AuthorizationException(__('Only the administrator can update this user.')); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Requests/Frontend/Auth/DisableTwoFactorAuthenticationRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'max:10', 'totp_code'], 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Domains/Auth/Http/Requests/Frontend/Auth/UpdatePasswordRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'max:100'], 33 | 'password' => array_merge( 34 | [ 35 | 'max:100', 36 | new UnusedPassword($this->user()), 37 | ], 38 | PasswordRules::changePassword( 39 | $this->email, 40 | config('boilerplate.access.user.password_history') ? 'current_password' : null 41 | ) 42 | ), 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/Domains/Auth/Models/PasswordHistory.php: -------------------------------------------------------------------------------- 1 | isAdmin()) { 16 | return 'All'; 17 | } 18 | 19 | if (! $this->permissions->count()) { 20 | return 'None'; 21 | } 22 | 23 | return collect($this->getPermissionDescriptions()) 24 | ->implode('
'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Domains/Auth/Models/Traits/Method/RoleMethod.php: -------------------------------------------------------------------------------- 1 | name === config('boilerplate.access.role.admin'); 18 | } 19 | 20 | /** 21 | * @return Collection 22 | */ 23 | public function getPermissionDescriptions(): Collection 24 | { 25 | return $this->permissions->pluck('description'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/Auth/Models/Traits/Relationship/PermissionRelationship.php: -------------------------------------------------------------------------------- 1 | belongsTo(__CLASS__, 'parent_id')->with('parent'); 16 | } 17 | 18 | /** 19 | * @return mixed 20 | */ 21 | public function children() 22 | { 23 | return $this->hasMany(__CLASS__, 'parent_id')->with('children'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Auth/Models/Traits/Relationship/UserRelationship.php: -------------------------------------------------------------------------------- 1 | morphMany(PasswordHistory::class, 'model'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Domains/Auth/Models/Traits/Scope/PermissionScope.php: -------------------------------------------------------------------------------- 1 | whereDoesntHave('parent') 17 | ->whereHas('children'); 18 | } 19 | 20 | /** 21 | * @param $query 22 | * @return mixed 23 | */ 24 | public function scopeIsParent($query) 25 | { 26 | return $query->whereHas('children'); 27 | } 28 | 29 | /** 30 | * @param $query 31 | * @return mixed 32 | */ 33 | public function scopeIsChild($query) 34 | { 35 | return $query->whereHas('parent'); 36 | } 37 | 38 | /** 39 | * @param $query 40 | * @return mixed 41 | */ 42 | public function scopeSingular($query) 43 | { 44 | return $query->whereNull('parent_id') 45 | ->whereDoesntHave('children'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Domains/Auth/Models/Traits/Scope/RoleScope.php: -------------------------------------------------------------------------------- 1 | where(function ($query) use ($term) { 18 | $query->where('name', 'like', '%'.$term.'%') 19 | ->orWhereHas('permissions', function ($query) use ($term) { 20 | $query->where('description', 'like', '%'.$term.'%'); 21 | }); 22 | }); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Domains/Auth/Observers/UserObserver.php: -------------------------------------------------------------------------------- 1 | logPasswordHistory($user); 18 | } 19 | 20 | /** 21 | * @param User $user 22 | */ 23 | public function updated(User $user): void 24 | { 25 | // Only log password history on update if the password actually changed 26 | if ($user->isDirty('password')) { 27 | $this->logPasswordHistory($user); 28 | } 29 | } 30 | 31 | /** 32 | * @param User $user 33 | */ 34 | private function logPasswordHistory(User $user): void 35 | { 36 | if (config('boilerplate.access.user.password_history')) { 37 | $user->passwordHistories()->create([ 38 | 'password' => $user->password, // Password already hashed & saved so just take from model 39 | ]); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Domains/Auth/Services/PermissionService.php: -------------------------------------------------------------------------------- 1 | model = $permission; 21 | } 22 | 23 | /** 24 | * @return mixed 25 | */ 26 | public function getCategorizedPermissions() 27 | { 28 | return $this->model::isMaster() 29 | ->with('children') 30 | ->get(); 31 | } 32 | 33 | /** 34 | * @return mixed 35 | */ 36 | public function getUncategorizedPermissions() 37 | { 38 | return $this->model::singular() 39 | ->orderBy('sort', 'asc') 40 | ->get(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Exceptions/GeneralException.php: -------------------------------------------------------------------------------- 1 | back() 49 | ->withInput() 50 | ->withFlashDanger($this->message); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Exceptions/ReportableException.php: -------------------------------------------------------------------------------- 1 | back() 49 | ->withInput() 50 | ->withFlashDanger($this->message); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Helpers/Global/GeneralHelper.php: -------------------------------------------------------------------------------- 1 | check()) { 41 | if (auth()->user()->isAdmin()) { 42 | return 'admin.dashboard'; 43 | } 44 | 45 | if (auth()->user()->isUser()) { 46 | return 'frontend.user.dashboard'; 47 | } 48 | } 49 | 50 | return 'frontend.index'; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Helpers/Global/HtmlHelper.php: -------------------------------------------------------------------------------- 1 | getLocale()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Helpers/Global/SystemHelper.php: -------------------------------------------------------------------------------- 1 | valid()) { 17 | if (! $it->isDot() && $it->isFile() && $it->isReadable() && $it->current()->getExtension() === 'php') { 18 | require $it->key(); 19 | } 20 | 21 | $it->next(); 22 | } 23 | } catch (Exception $e) { 24 | echo $e->getMessage(); 25 | } 26 | } 27 | } 28 | 29 | if (! function_exists('includeRouteFiles')) { 30 | 31 | /** 32 | * @param $folder 33 | */ 34 | function includeRouteFiles($folder) 35 | { 36 | includeFilesInFolder($folder); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Helpers/Global/TimezoneHelper.php: -------------------------------------------------------------------------------- 1 | updateProfile($request->user(), $request->validated()); 21 | 22 | if (session()->has('resent')) { 23 | return redirect()->route('frontend.auth.verification.notice')->withFlashInfo(__('You must confirm your new e-mail address before you can go any further.')); 24 | } 25 | 26 | return redirect()->route('frontend.user.account', ['#information'])->withFlashSuccess(__('Profile successfully updated.')); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/LocaleController.php: -------------------------------------------------------------------------------- 1 | setLocale($locale); 17 | 18 | session()->put('locale', $locale); 19 | 20 | return redirect()->back(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Livewire/Backend/RolesTable.php: -------------------------------------------------------------------------------- 1 | withCount('users') 22 | ->when($this->getFilter('search'), fn ($query, $term) => $query->search($term)); 23 | } 24 | 25 | public function columns(): array 26 | { 27 | return [ 28 | Column::make(__('Type')) 29 | ->sortable(), 30 | Column::make(__('Name')) 31 | ->sortable(), 32 | Column::make(__('Permissions')), 33 | Column::make(__('Number of Users'), 'users_count') 34 | ->sortable(), 35 | Column::make(__('Actions')), 36 | ]; 37 | } 38 | 39 | public function rowView(): string 40 | { 41 | return 'backend.auth.role.includes.row'; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Http/Livewire/Frontend/TwoFactorAuthentication.php: -------------------------------------------------------------------------------- 1 | validate([ 25 | 'code' => 'required|min:6', 26 | ]); 27 | 28 | if ($request->user()->confirmTwoFactorAuth($this->code)) { 29 | $this->resetErrorBag(); 30 | 31 | session()->flash('flash_success', __('Two Factor Authentication Successfully Enabled')); 32 | 33 | return redirect()->route('frontend.auth.account.2fa.show'); 34 | } 35 | 36 | $this->addError('code', __('Your authorization code was invalid. Please try again.')); 37 | 38 | return false; 39 | } 40 | 41 | /** 42 | * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 43 | */ 44 | public function render() 45 | { 46 | return view('components.frontend.two-factor-authentication'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 21 | return route('frontend.auth.login'); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | has('locale')) { 23 | setAllLocale(session()->get('locale')); 24 | } 25 | 26 | return $next($request); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 29 | return redirect(RouteServiceProvider::HOME); 30 | } 31 | } 32 | 33 | return $next($request); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | ['required', 'max:100'], 32 | 'email' => [Rule::requiredIf(function () { 33 | return config('boilerplate.access.user.change_email'); 34 | }), 'max:255', 'email', Rule::unique('users')->ignore($this->user()->id)], 35 | ]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Models/Traits/Uuid.php: -------------------------------------------------------------------------------- 1 | where($this->getUuidName(), $uuid); 20 | } 21 | 22 | /** 23 | * @return string 24 | */ 25 | public function getUuidName() 26 | { 27 | return property_exists($this, 'uuidName') ? $this->uuidName : 'uuid'; 28 | } 29 | 30 | /** 31 | * Use Laravel bootable traits. 32 | */ 33 | protected static function bootUuid() 34 | { 35 | static::creating(function ($model) { 36 | $model->{$model->getUuidName()} = PackageUuid::uuid4()->toString(); 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 20 | ]; 21 | 22 | /** 23 | * Register any authentication / authorization services. 24 | * 25 | * @return void 26 | */ 27 | public function boot() 28 | { 29 | $this->registerPolicies(); 30 | 31 | // Implicitly grant "Admin" role all permissions 32 | // This works in the app by using gate-related functions like auth()->user->can() and @can() 33 | Gate::before(function ($user) { 34 | return $user->hasAllAccess() ? true : null; 35 | }); 36 | 37 | // Learn when to use this instead: https://docs.spatie.be/laravel-permission/v3/basic-usage/super-admin/#gate-after 38 | // Gate::after(function ($user) { 39 | // return $user->hasAllAccess(); 40 | // }); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | with('logged_in_user', auth()->user()); 23 | }); 24 | 25 | View::composer(['frontend.index', 'frontend.layouts.app'], function ($view) use ($announcementService) { 26 | $view->with('announcements', $announcementService->getForFrontend()); 27 | }); 28 | 29 | View::composer(['backend.layouts.app'], function ($view) use ($announcementService) { 30 | $view->with('announcements', $announcementService->getForBackend()); 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 23 | SendEmailVerificationNotification::class, 24 | ], 25 | ]; 26 | 27 | /** 28 | * Class event subscribers. 29 | * 30 | * @var array 31 | */ 32 | protected $subscribe = [ 33 | RoleEventListener::class, 34 | UserEventListener::class, 35 | ]; 36 | 37 | /** 38 | * Register any events for your application. 39 | * 40 | * @return void 41 | */ 42 | public function boot() 43 | { 44 | parent::boot(); 45 | 46 | // 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Providers/HelperServiceProvider.php: -------------------------------------------------------------------------------- 1 | valid()) { 23 | if ( 24 | ! $it->isDot() && 25 | $it->isFile() && 26 | $it->isReadable() && 27 | $it->current()->getExtension() === 'php' && 28 | strpos($it->current()->getFilename(), 'Helper') 29 | ) { 30 | require $it->key(); 31 | } 32 | 33 | $it->next(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Providers/LocaleServiceProvider.php: -------------------------------------------------------------------------------- 1 | registerBladeExtensions(); 21 | } 22 | 23 | /** 24 | * Register the locale blade extensions. 25 | */ 26 | protected function registerBladeExtensions(): void 27 | { 28 | /* 29 | * The block of code inside this directive indicates 30 | * the chosen language requests RTL support. 31 | */ 32 | Blade::if('langrtl', function () { 33 | return session()->has('lang-rtl'); 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Providers/ObserverServiceProvider.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/livewire-tables.php: -------------------------------------------------------------------------------- 1 | 'bootstrap-4', 8 | ]; 9 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /database/factories/RoleFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->randomElement([User::TYPE_ADMIN, User::TYPE_USER]), 30 | 'name' => $this->faker->word, 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->morphs('tokenable'); 19 | $table->string('name'); 20 | $table->string('token', 64)->unique(); 21 | $table->text('abilities')->nullable(); 22 | $table->timestamp('last_used_at')->nullable(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('personal_access_tokens'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2020_05_25_021239_create_announcements_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->enum('area', ['frontend', 'backend'])->nullable(); 19 | $table->enum('type', ['info', 'danger', 'warning', 'success'])->default('info'); 20 | $table->text('message'); 21 | $table->boolean('enabled')->default(true); 22 | $table->timestamp('starts_at')->nullable(); 23 | $table->timestamp('ends_at')->nullable(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('announcements'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2020_05_29_020244_create_password_histories_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('model_type'); 19 | $table->unsignedBigInteger('model_id'); 20 | $table->string('password'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('password_histories'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/seeders/Auth/UserRoleSeeder.php: -------------------------------------------------------------------------------- 1 | disableForeignKeys(); 22 | 23 | User::find(1)->assignRole(config('boilerplate.access.role.admin')); 24 | 25 | $this->enableForeignKeys(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/seeders/Auth/UserSeeder.php: -------------------------------------------------------------------------------- 1 | disableForeignKeys(); 22 | 23 | // Add the master administrator, user id of 1 24 | User::create([ 25 | 'type' => User::TYPE_ADMIN, 26 | 'name' => 'Super Admin', 27 | 'email' => 'admin@admin.com', 28 | 'password' => 'secret', 29 | 'email_verified_at' => now(), 30 | 'active' => true, 31 | ]); 32 | 33 | if (app()->environment(['local', 'testing'])) { 34 | User::create([ 35 | 'type' => User::TYPE_USER, 36 | 'name' => 'Test User', 37 | 'email' => 'user@user.com', 38 | 'password' => 'secret', 39 | 'email_verified_at' => now(), 40 | 'active' => true, 41 | ]); 42 | } 43 | 44 | $this->enableForeignKeys(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | truncateMultiple([ 24 | 'activity_log', 25 | 'failed_jobs', 26 | ]); 27 | 28 | $this->call(AuthSeeder::class); 29 | $this->call(AnnouncementSeeder::class); 30 | 31 | Model::reguard(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/seeders/Traits/TruncateTable.php: -------------------------------------------------------------------------------- 1 | truncate(); 21 | 22 | case 'pgsql': 23 | return DB::statement('TRUNCATE TABLE '.$table.' RESTART IDENTITY CASCADE'); 24 | 25 | case 'sqlite': case 'sqlsrv': 26 | return DB::statement('DELETE FROM '.$table); 27 | } 28 | 29 | return false; 30 | } 31 | 32 | /** 33 | * @param array $tables 34 | */ 35 | protected function truncateMultiple(array $tables) 36 | { 37 | foreach ($tables as $table) { 38 | $this->truncate($table); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run production", 10 | "production": "mix --production" 11 | }, 12 | "devDependencies": { 13 | "@coreui/coreui": "^3.0.0", 14 | "@coreui/icons": "^1.0.1", 15 | "@fortawesome/fontawesome-free": "^5.12.1", 16 | "@popperjs/core": "^2.5.1", 17 | "alpinejs": "^2.3.5", 18 | "axios": "^0.21.1", 19 | "bootstrap": "^4.5.0", 20 | "cross-env": "^7.0", 21 | "jquery": "^3.5.1", 22 | "laravel-mix": "^6.0.6", 23 | "lodash": "^4.17.19", 24 | "perfect-scrollbar": "^1.5.0", 25 | "popper.js": "^1.16.1", 26 | "postcss": "^8.1", 27 | "resolve-url-loader": "^3.1.0", 28 | "sass": "^1.20.1", 29 | "sass-loader": "^8.0.0", 30 | "sweetalert2": "^9.8.2", 31 | "vue": "^2.5.17", 32 | "vue-loader": "^15.9.5", 33 | "vue-template-compiler": "^2.6.10" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rappasoft/laravel-boilerplate/a91de1efacc38eea14b46a898c99e9b1b5d45636/public/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/js/backend/app.js: -------------------------------------------------------------------------------- 1 | import 'alpinejs' 2 | 3 | window.$ = window.jQuery = require('jquery'); 4 | window.Swal = require('sweetalert2'); 5 | 6 | // CoreUI 7 | require('@coreui/coreui'); 8 | 9 | // Boilerplate 10 | require('../plugins'); 11 | -------------------------------------------------------------------------------- /resources/js/frontend/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * First we will load all of this project's JavaScript dependencies which 3 | * includes Vue and other libraries. It is a great starting point when 4 | * building robust, powerful web applications using Vue and Laravel. 5 | */ 6 | 7 | require('../bootstrap'); 8 | require('../plugins'); 9 | 10 | import Vue from 'vue'; 11 | 12 | /** 13 | * The following block of code may be used to automatically register your 14 | * Vue components. It will recursively scan this directory for the Vue 15 | * components and automatically register them with their "basename". 16 | * 17 | * Eg. ./components/ExampleComponent.vue -> 18 | */ 19 | 20 | // const files = require.context('./', true, /\.vue$/i) 21 | // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)) 22 | 23 | Vue.component('example-component', require('./components/ExampleComponent.vue').default); 24 | 25 | /** 26 | * Next, we will create a fresh Vue application instance and attach it to 27 | * the page. Then, you may begin adding components to this application 28 | * or customize the JavaScript scaffolding to fit your unique needs. 29 | */ 30 | 31 | const app = new Vue({ 32 | el: '#app', 33 | }); 34 | -------------------------------------------------------------------------------- /resources/js/frontend/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 12 | -------------------------------------------------------------------------------- /resources/lang/ar/auth.php: -------------------------------------------------------------------------------- 1 | 'البيانات المدخلة لا تتطابق مع قاعدة بيناتنا.', 16 | 'throttle' => 'ثانية من محاولات تسجيل الدخول الفاشلة، برجاء المحاولة مرة أخرى بعد :seconds seconds.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/ar/pagination.php: -------------------------------------------------------------------------------- 1 | '« السابق', 16 | 'next' => 'التالي »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/ar/passwords.php: -------------------------------------------------------------------------------- 1 | 'لقد تم إعادة تعيين كلمة مرورك!', 16 | 'sent' => 'قمنا بإرسال رابط إعادة تعيين كلمة مرورك إلى بريدك الإلكتروني!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'رمز إعادة تعيين كلمة المرور هذا غير صالح.', 19 | 'user' => 'لم نستطع إيجاد مستخدم ينتمي إليه هذا البريد الإلكتروني.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/az/auth.php: -------------------------------------------------------------------------------- 1 | 'İstifadə etdiyiniz məlumatlar bizim bazamızda yoxdur.', 16 | 'throttle' => 'Həddindən artıq uğursuz login cəhdi.Xahiş edirik :seconds saniyə sonra cəhd edin.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/az/pagination.php: -------------------------------------------------------------------------------- 1 | '« Əvvəlki', 16 | 'next' => 'Sonrakı »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/az/passwords.php: -------------------------------------------------------------------------------- 1 | 'Şifrəniz sıfırlandı!', 16 | 'sent' => 'Elektron poçt ünvanınıza şifrənin sıfırlanması üçün məktub göndərildi', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Şifrəni sıfırlamaq üçün istifadə etdiyiniz token keçərsizdir.', 19 | 'user' => ' Qeyd etdiyiniz Elektron poçt ünvanına aid istifadəçi tapa bilmədik', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/cs/auth.php: -------------------------------------------------------------------------------- 1 | 'Tyto přihlašovací údaje neodpovídají žadnému záznamu.', 16 | 'throttle' => 'Příliš mnoho pokusů o přihlášení. Zkuste to prosím znovu za :seconds vteřin.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/cs/pagination.php: -------------------------------------------------------------------------------- 1 | '« předchozí', 16 | 'next' => 'další »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/cs/passwords.php: -------------------------------------------------------------------------------- 1 | 'Heslo bylo obnoveno!', 16 | 'sent' => 'E-mail s instrukcemi k obnovení hesla byl odeslán!', 17 | 'throttled' => 'Počkejte prosím a zkuste to znovu.', 18 | 'token' => 'Klíč pro obnovu hesla je nesprávný.', 19 | 'user' => 'Nepodařilo se najít uživatele s touto e-mailovou adresou.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/da/auth.php: -------------------------------------------------------------------------------- 1 | 'Disse legitimationsoplysninger passer ikke vores optegnelser.', 16 | 'throttle' => 'For mange mislykkede forsøg. Prøv igen om :seconds sekunder.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/da/pagination.php: -------------------------------------------------------------------------------- 1 | '« Forrige', 16 | 'next' => 'Næste »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/da/passwords.php: -------------------------------------------------------------------------------- 1 | 'Din adgangskode er blevet nulstillet!', 16 | 'sent' => 'Vi har sendt dig et link til at nulstille din adgangskode!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Dette link til at nulstille din adgangskode er ugyldig.', 19 | 'user' => 'Vi kan ikke finde en bruger med denne e-mailadresse.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/de/auth.php: -------------------------------------------------------------------------------- 1 | 'Zugangsdaten nicht gefunden.', 16 | 'throttle' => 'Zuviele Anmeldeversuche. Bitte warte :seconds Sekunden.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/de/pagination.php: -------------------------------------------------------------------------------- 1 | '« Vorherige', 16 | 'next' => 'Nächste »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/de/passwords.php: -------------------------------------------------------------------------------- 1 | 'Dein Kennwort wurde zurückgesetzt!', 16 | 'sent' => 'Wir haben dir einen Link zum Zurücksetzen deines Kennworts gesendet!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Der Token zum Zurücksetzen des Kennworts ist ungültig.', 19 | 'user' => 'Wir können keinen Benutzer mit der E-Mailadresse finden.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/el/auth.php: -------------------------------------------------------------------------------- 1 | 'Αυτά τα διαπιστευτήρια δεν ταιριάζουν με τα αρχεία μας.', 16 | 'throttle' => 'Πολλές προσπάθειες σύνδεσης. Παρακαλούμε προσπαθήστε πάλι σε :seconds δευτερόλεπτα.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/el/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 16 | 'next' => 'Next »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/el/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 16 | 'sent' => 'We have e-mailed your password reset link!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'This password reset token is invalid.', 19 | 'user' => "We can't find a user with that e-mail address.", 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have e-mailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/es/auth.php: -------------------------------------------------------------------------------- 1 | 'Las credenciales no se han encontrado.', 16 | 'throttle' => 'Demasiados intentos de inicio de sesión. Vuelva a intentarlo en :seconds segundos.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/es/pagination.php: -------------------------------------------------------------------------------- 1 | '« Anterior', 16 | 'next' => 'Siguiente »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/es/passwords.php: -------------------------------------------------------------------------------- 1 | '¡Su contraseña se ha reiniciado!', 16 | 'sent' => '¡Le hemos enviado el enlace para el reinicio de la contraseña!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'El código del reinicio de la contraseña es incorrecto.', 19 | 'user' => 'No se ha encontrado ningún Usuario con este correo.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/fa/auth.php: -------------------------------------------------------------------------------- 1 | 'این اعتبارات با سوابق ما مطابقت ندارد.', 16 | 'throttle' => 'تلاش های زیادی برای ورود به سیستم. لطفا :seconds ثانیه دیگر مجددا امتحان کنید.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/fa/pagination.php: -------------------------------------------------------------------------------- 1 | '« قبلی', 16 | 'next' => 'بعدی »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/fa/passwords.php: -------------------------------------------------------------------------------- 1 | 'رمز عبور شما بازگردانی شد!', 16 | 'sent' => 'لینک بازگردانی رمز عبور به ایمیل شما ارسال شد.', 17 | 'throttled' => 'پیش از تلاش مجدد کمی صبر کنید.', 18 | 'token' => 'مشخصه‌ی بازگردانی رمز عبور معتبر نیست.', 19 | 'user' => 'ما کاربری با این نشانی ایمیل نداریم!', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/fr/auth.php: -------------------------------------------------------------------------------- 1 | 'Ces informations de connexion ne correspondent pas.', 16 | 'throttle' => 'Vous avez effectué trop de tentatives de connexion. Veuillez réessayer dans :seconds secondes.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/fr/pagination.php: -------------------------------------------------------------------------------- 1 | '« Précédent', 16 | 'next' => 'Suivant »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/fr/passwords.php: -------------------------------------------------------------------------------- 1 | 'Votre mot de passe a été modifié !', 16 | 'sent' => 'Un email contenant un lien de réinitialisation vous a été envoyé !', 17 | 'throttled' => 'Veuillez patienter avant d\'essayer à nouveau.', 18 | 'token' => "Ce jeton de réinitialisation du mot de passe n'est pas valide.", 19 | 'user' => "Aucun utilisateur n'est enregistré avec cette adresse email.", 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/he/auth.php: -------------------------------------------------------------------------------- 1 | 'פרטי ההתחברות שהזנת לא נכונים.', 16 | 'throttle' => 'יותר מדי ניסיונות התחברות. אנא נסה שוב בעוד :seconds שניות.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/he/pagination.php: -------------------------------------------------------------------------------- 1 | '« הקודם', 16 | 'next' => 'הבא »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/he/passwords.php: -------------------------------------------------------------------------------- 1 | 'הסיסמה שלך אופסה!', 16 | 'sent' => 'שלחנו קישור לאיפוס סיסמה לכתובת הדוא"ל שלך!', 17 | 'throttled' => 'אנא המתן לפני הנסיון הבא.', 18 | 'token' => 'אסימון (טוקן) איפוס סיסמה לא תקין.', 19 | 'user' => 'המייל הזה לא משוייך לאף משתמש שרשום במערכת.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/id/auth.php: -------------------------------------------------------------------------------- 1 | 'Identitas tersebut tidak cocok dengan catatan kami.', 16 | 'throttle' => 'Terlalu banyak usaha login. Coba lagi dalam :seconds detik.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/id/pagination.php: -------------------------------------------------------------------------------- 1 | '« Sebelumnya', 16 | 'next' => 'Selanjutnya »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/id/passwords.php: -------------------------------------------------------------------------------- 1 | 'Sandi Anda sudah direset!', 16 | 'sent' => 'Kami sudah mengirim email yang berisi tautan untuk mereset kata sandi Anda!', 17 | 'throttled' => 'Mohon tunggu sebelum mencoba lagi.', 18 | 'token' => 'Token reset sandi tidak benar.', 19 | 'user' => 'Kami tidak dapat menemukan pengguna dengan alamat e-mail tersebut.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/it/auth.php: -------------------------------------------------------------------------------- 1 | 'Le credenziali non corrispondono a quelle registrate.', 16 | 'throttle' => 'Troppi tentativi di login. Si prega di riprovare tra :seconds secondi.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/it/pagination.php: -------------------------------------------------------------------------------- 1 | '« Precedente', 16 | 'next' => 'Successiva »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/it/passwords.php: -------------------------------------------------------------------------------- 1 | 'La password è stata reimpostata!', 16 | 'sent' => 'E-mail per il reset della password inviata!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Questo token per il reset della password non è valido.', 19 | 'user' => 'Non esiste alcun utente associato a questo indirizzo e-mail.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/ja/auth.php: -------------------------------------------------------------------------------- 1 | 'これらの資格情報は記録と一致しません。', 16 | 'throttle' => 'ログイン試行が多すぎます。 :seconds 後にもう一度お試しください。', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/ja/pagination.php: -------------------------------------------------------------------------------- 1 | '« 前ページ', 16 | 'next' => '次ページ »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/ja/passwords.php: -------------------------------------------------------------------------------- 1 | 'あなたのパスワードはリセットされました!', 16 | 'sent' => 'パスワードリセットリンクをメールで送信しました!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'このパスワードリセットトークンは無効です。', 19 | 'user' => 'その電子メールアドレスを持つユーザーは見つかりません', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/ko/auth.php: -------------------------------------------------------------------------------- 1 | '이 자격 증명은 기록과 일치하지 않습니다.', 17 | 'password' => '제공된 비밀번호가 올바르지 않습니다.', 18 | 'throttle' => '로그인 시도가 너무 많습니다. 몇 초 후에 다시 시도하십시오.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/ko/pagination.php: -------------------------------------------------------------------------------- 1 | '« 이전', 17 | 'next' => '다음 »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/ko/passwords.php: -------------------------------------------------------------------------------- 1 | '비밀번호가 재설정되었습니다!', 17 | 'sent' => '비밀번호 재설정 링크를 이메일로 보냈습니다!', 18 | 'throttled' => '다시 시도하기 전에 잠시 기다려 주십시오.', 19 | 'token' => '해당 비밀번호 재설정 토큰이 잘못되었습니다.', 20 | 'user' => '해당 전자 메일 주소를 가진 사용자를 찾을 수 없습니다.', 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/nl/auth.php: -------------------------------------------------------------------------------- 1 | 'Toegangsgegevens niet gevonden', 16 | 'throttle' => 'Te veel aanmeld pogingen, probeer het nog eens na :seconds seconden.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/nl/pagination.php: -------------------------------------------------------------------------------- 1 | '« Vorige', 16 | 'next' => 'Volgende »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/nl/passwords.php: -------------------------------------------------------------------------------- 1 | 'Uw wachtwoord is gereset!', 16 | 'sent' => 'We hebben uw wachtwoord reset link ge-e-maild!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Dit wachtwoord reset token is ongeldig.', 19 | 'user' => 'We kunnen geen gebruiker met dat e-mailadres vinden', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/no/auth.php: -------------------------------------------------------------------------------- 1 | 'Brukernavn eller passord stemmer ikke.', 16 | 'throttle' => 'For mange mislykkede forsøk. Prøv igen om :seconds sekunder.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/no/pagination.php: -------------------------------------------------------------------------------- 1 | '« Forrige', 16 | 'next' => 'Neste »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/no/passwords.php: -------------------------------------------------------------------------------- 1 | 'Dit passord er blitt tilbakestilt!', 16 | 'sent' => 'Vi har sendt deg et link til å tilbakestille passordet!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Denne linken til å tilbakestille passordet er ugyldig.', 19 | 'user' => 'Vi kan ikke finne en bruker med denne adressen.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/pl/auth.php: -------------------------------------------------------------------------------- 1 | 'Błędny login lub hasło.', 16 | 'throttle' => 'Za dużo nieudanych prób logowania. Proszę spróbować za :seconds sekund.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/pl/pagination.php: -------------------------------------------------------------------------------- 1 | '« Poprzednia', 16 | 'next' => 'Następna »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/pl/passwords.php: -------------------------------------------------------------------------------- 1 | 'Hasło zostało zresetowane!', 16 | 'sent' => 'Przypomnienie hasła zostało wysłane!', 17 | 'throttled' => 'Proszę zaczekać zanim spróbujesz ponownie.', 18 | 'token' => 'Token resetowania hasła jest nieprawidłowy.', 19 | 'user' => 'Nie znaleziono użytkownika z takim adresem e-mail.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/pt_BR/auth.php: -------------------------------------------------------------------------------- 1 | 'Estas credenciais não correspondem com nossos registros.', 17 | 'throttle' => 'Você realizou muitas tentativas de login. Favor tentar novamente em :seconds segundos.', 18 | ]; 19 | -------------------------------------------------------------------------------- /resources/lang/pt_BR/pagination.php: -------------------------------------------------------------------------------- 1 | '« Anterior', 17 | 'next' => 'Próximo »', 18 | ]; 19 | -------------------------------------------------------------------------------- /resources/lang/pt_BR/passwords.php: -------------------------------------------------------------------------------- 1 | 'Sua senha foi redefinida!', 17 | 'sent' => 'Nós enviamos um link de recuperação de senha por e-mail.', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'Este código de recuperação de senha é inválido.', 20 | 'user' => 'Não conseguimos encontrar nenhum usuário com o endereço de e-mail especificado.', 21 | ]; 22 | -------------------------------------------------------------------------------- /resources/lang/pt_PT/auth.php: -------------------------------------------------------------------------------- 1 | 'Essas credenciais não foram encontradas na nossa base de dados.', 17 | 'password' => 'A palavra-passe introduzida está incorreta.', 18 | 'throttle' => 'Excedeu as tentativas de login. Por favor tente novamente em :seconds segundos.', 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/pt_PT/pagination.php: -------------------------------------------------------------------------------- 1 | '« Anterior', 17 | 'next' => 'Próximo »', 18 | ]; 19 | -------------------------------------------------------------------------------- /resources/lang/pt_PT/passwords.php: -------------------------------------------------------------------------------- 1 | 'A sua palavra-passe foi redefinida!', 17 | 'sent' => 'Enviámos por email o link de recuperação de palavra-passe.', 18 | 'throttled' => 'Por favor aguarde antes de voltar a tentar.', 19 | 'token' => 'Este código de recuperação de palavra-passe é inválido.', 20 | 'user' => 'Não conseguimos encontrar nenhum utilizador com o endereço de e-mail especificado.', 21 | ]; 22 | -------------------------------------------------------------------------------- /resources/lang/ro/auth.php: -------------------------------------------------------------------------------- 1 | 'Credentialele nu au fost gasite.', 17 | 'throttle' => 'Prea multe incercari de conectare. Va rugam sa incercati din nou in :seconds secunde.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/ro/pagination.php: -------------------------------------------------------------------------------- 1 | '« Inapoi', 17 | 'next' => 'Inainte »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/ro/passwords.php: -------------------------------------------------------------------------------- 1 | 'Parola dumneavoastra a fost resetata!', 17 | 'sent' => 'V-am trimis un email cu linkul de resetare al parolei!', 18 | 'throttled' => 'Va rugam sa asteptati inainte de a incerca din nou.', 19 | 'token' => 'Token-ul de resetare al parolei este invalid.', 20 | 'user' => 'Nu putem gasi un user cu aceasta adresa de e-mail.', 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/ru/auth.php: -------------------------------------------------------------------------------- 1 | 'Имя пользователя и пароль не совпадают.', 17 | 'throttle' => 'Слишком много попыток входа. Пожалуйста, попробуйте еще раз через :seconds секунд.', 18 | ]; 19 | -------------------------------------------------------------------------------- /resources/lang/ru/pagination.php: -------------------------------------------------------------------------------- 1 | '« Назад', 16 | 'next' => 'Вперёд »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/ru/passwords.php: -------------------------------------------------------------------------------- 1 | 'Ваш пароль был изменен!', 16 | 'sent' => 'На ваш E-mail отправлена инструкция на изменение пароля!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Ошибочный код изменения пароля.', 19 | 'user' => 'Не удалось найти пользователя с указанным E-mail.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/sv/auth.php: -------------------------------------------------------------------------------- 1 | 'Dessa uppgifter stämmer inte överens med vårt register.', 16 | 'throttle' => 'För många misslyckade försök att logga in i rad. Du kan försöka igen om :seconds sekunder.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/sv/pagination.php: -------------------------------------------------------------------------------- 1 | '« Föregående', 16 | 'next' => 'Nästa »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/sv/passwords.php: -------------------------------------------------------------------------------- 1 | 'Ditt lösenord har återställts!', 16 | 'sent' => 'Ett mail med länk för återställning av ditt lösenord har nu skickats!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Denna kod för att återställa lösenord är ogiltig.', 19 | 'user' => 'Det finns ingen registrerad användare med den e-postadressen.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/th/auth.php: -------------------------------------------------------------------------------- 1 | 'ข้อมูลที่ใช้ในการยืนยันตัวตนไม่ถูกต้อง', 16 | 'throttle' => 'คุณได้พยายามเข้าระบบหลายครั้งเกินไป กรุณาลองใหม่ใน :seconds วินาทีข้างหน้า', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/th/pagination.php: -------------------------------------------------------------------------------- 1 | '« ก่อนหน้า', 16 | 'next' => 'ถัดไป »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/th/passwords.php: -------------------------------------------------------------------------------- 1 | 'ทำการตั้งค่ารหัสผ่านใหม่แล้ว!', 16 | 'sent' => 'ระบบได้ส่งอีเมลสำหรับตั้งรหัสผ่านใหม่ให้คุณแล้ว!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'ชุดรหัสสำหรับการเปลี่ยนรหัสผ่านไม่ถูกต้อง', 19 | 'user' => 'ไม่พบผู้ใช้งานที่ตรงกับอีเมล์นี้', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/tr/auth.php: -------------------------------------------------------------------------------- 1 | 'Bu kimlik bilgileri kayıtlarımızla eşleşmiyor.', 16 | 'throttle' => 'Çok fazla giriş denemesi. Lütfen :seconds saniye sonra yeniden deneyin.', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/tr/pagination.php: -------------------------------------------------------------------------------- 1 | '« Önceki', 16 | 'next' => 'Sonraki »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/tr/passwords.php: -------------------------------------------------------------------------------- 1 | 'Şifreniz sıfırlandı!', 16 | 'sent' => 'Parola sıfırlama bağlantınızı e-posta ile gönderdik!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Bu parola sıfırlama simgesi geçersiz.', 19 | 'user' => 'Bu e-posta adresine sahip bir kullanıcı bulamıyoruz.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/uk/auth.php: -------------------------------------------------------------------------------- 1 | 'Ці облікові дані не збігаються з нашими записами.', 17 | 'throttle' => 'Занадто багато спроб входу. Будь ласка, спробуйте ще раз, через :seconds секунд.', 18 | ]; 19 | -------------------------------------------------------------------------------- /resources/lang/uk/pagination.php: -------------------------------------------------------------------------------- 1 | '« Назад', 16 | 'next' => 'Далі »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/uk/passwords.php: -------------------------------------------------------------------------------- 1 | 'Ваш пароль змінено!', 16 | 'sent' => 'Ми надіслали на Вашу електронну адресу посилання для зміни пароля!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => 'Помилковий код для зміни пароля.', 19 | 'user' => 'Користувача з такою електронною адресою не знайдено.', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/vi/auth.php: -------------------------------------------------------------------------------- 1 | 'Không tìm thấy thông tin đăng nhập hợp lệ.', 17 | 'password' => 'Mật khẩu không đúng.', 18 | 'throttle' => 'Vượt quá số lần đăng nhập cho phép. Vui lòng thử lại sau :seconds giây.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/vi/pagination.php: -------------------------------------------------------------------------------- 1 | '« Trước', 17 | 'next' => 'Sau »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/vi/passwords.php: -------------------------------------------------------------------------------- 1 | 'Mật khẩu đã được cập nhật!', 17 | 'sent' => 'Chúng tôi đã gửi cho bạn đường dẫn thay đổi mật khẩu!', 18 | 'throttled' => 'Vui lòng đợi trước khi thử lại.', 19 | 'token' => 'Mã xác nhận mật khẩu không hợp lệ.', 20 | 'user' => 'Không tìm thấy thành viên với địa chỉ email này.', 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/zh-TW/auth.php: -------------------------------------------------------------------------------- 1 | '賬戶不存在,請重新輸入。 ', 16 | 'throttle' => '登錄失敗次數過多。請在 :seconds 秒後重試。 ', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/zh-TW/pagination.php: -------------------------------------------------------------------------------- 1 | '« 上一頁', 16 | 'next' => '下一頁 »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/zh-TW/passwords.php: -------------------------------------------------------------------------------- 1 | '您的密碼已重置! ', 16 | 'sent' => '我們已通過電子郵件發送您的密碼重置鏈接! ', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => '此密碼重置令牌無效。 ', 19 | 'user' => '我們找不到具有該電子郵件地址的用戶', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/zh/auth.php: -------------------------------------------------------------------------------- 1 | '用户名或密码错误。', 16 | 'throttle' => '尝试登录次数过多. 请 :seconds 秒后再试。', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/zh/pagination.php: -------------------------------------------------------------------------------- 1 | '« 上一页', 16 | 'next' => '下一页 »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/zh/passwords.php: -------------------------------------------------------------------------------- 1 | '密码重置成功!', 16 | 'sent' => '密码重置邮件已发送!', 17 | 'throttled' => 'Please wait before retrying.', 18 | 'token' => '密码重置令牌无效。', 19 | 'user' => '找不到该邮箱对应的用户。', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/sass/_global.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 3 | @import '~@fortawesome/fontawesome-free/scss/fontawesome'; 4 | @import '~@fortawesome/fontawesome-free/scss/regular'; 5 | @import '~@fortawesome/fontawesome-free/scss/solid'; 6 | @import '~@fortawesome/fontawesome-free/scss/brands'; 7 | -------------------------------------------------------------------------------- /resources/sass/backend/app.scss: -------------------------------------------------------------------------------- 1 | @import "../global"; 2 | 3 | // Coreui 4 | @import '~@coreui/coreui/scss/coreui'; 5 | @import '~@coreui/icons/css/free.min.css'; 6 | -------------------------------------------------------------------------------- /resources/sass/frontend/_global.scss: -------------------------------------------------------------------------------- 1 | #breadcrumbs { 2 | background-color: #e9ecef; 3 | } 4 | 5 | .alert.header-message { 6 | border-radius: 0 !important; 7 | } 8 | -------------------------------------------------------------------------------- /resources/sass/frontend/_variables.scss: -------------------------------------------------------------------------------- 1 | // Body 2 | $body-bg: #f8fafc; 3 | 4 | // Typography 5 | $font-family-sans-serif: 'Nunito', sans-serif; 6 | $font-size-base: 0.9rem; 7 | $line-height-base: 1.6; 8 | 9 | // Colors 10 | $blue: #3490dc; 11 | $indigo: #6574cd; 12 | $purple: #9561e2; 13 | $pink: #f66d9b; 14 | $red: #e3342f; 15 | $orange: #f6993f; 16 | $yellow: #ffed4a; 17 | $green: #38c172; 18 | $teal: #4dc0b5; 19 | $cyan: #6cb2eb; 20 | -------------------------------------------------------------------------------- /resources/sass/frontend/app.scss: -------------------------------------------------------------------------------- 1 | @import "../global"; 2 | @import "global"; 3 | 4 | // Variables 5 | @import 'variables'; 6 | 7 | // Bootstrap 8 | @import '~bootstrap/scss/bootstrap'; 9 | -------------------------------------------------------------------------------- /resources/views/backend/auth/includes/permissions.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 | @include('backend.auth.role.includes.no-permissions-message') 6 | 7 |
8 | @include('backend.auth.includes.partials.permission-type', ['type' => $model::TYPE_ADMIN]) 9 |
10 | 11 |
12 | @include('backend.auth.includes.partials.permission-type', ['type' => $model::TYPE_USER]) 13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /resources/views/backend/auth/includes/roles.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 |
6 | @include('backend.auth.includes.partials.role-type', ['type' => $model::TYPE_ADMIN]) 7 |
8 | 9 |
10 | @include('backend.auth.includes.partials.role-type', ['type' => $model::TYPE_USER]) 11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /resources/views/backend/auth/role/includes/actions.blade.php: -------------------------------------------------------------------------------- 1 | @if (!$model->isAdmin()) 2 | 3 | 4 | @endif 5 | -------------------------------------------------------------------------------- /resources/views/backend/auth/role/includes/children.blade.php: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /resources/views/backend/auth/role/includes/no-permissions-message.blade.php: -------------------------------------------------------------------------------- 1 | @if ($general->count() + $categories->count() === 0) 2 | 3 | @lang('There are no permissions to choose from.') 4 | 5 | @endif 6 | -------------------------------------------------------------------------------- /resources/views/backend/auth/role/includes/row.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @if ($row->type === \App\Domains\Auth\Models\User::TYPE_ADMIN) 3 | {{ __('Administrator') }} 4 | @elseif ($row->type === \App\Domains\Auth\Models\User::TYPE_USER) 5 | {{ __('User') }} 6 | @else 7 | N/A 8 | @endif 9 | 10 | 11 | 12 | {{ $row->name }} 13 | 14 | 15 | 16 | {!! $row->permissions_label !!} 17 | 18 | 19 | 20 | {{ $row->users_count }} 21 | 22 | 23 | 24 | @include('backend.auth.role.includes.actions', ['model' => $row]) 25 | 26 | -------------------------------------------------------------------------------- /resources/views/backend/auth/role/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('backend.layouts.app') 2 | 3 | @section('title', __('Role Management')) 4 | 5 | @section('content') 6 | 7 | 8 | @lang('Role Management') 9 | 10 | 11 | 12 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | @endsection 25 | -------------------------------------------------------------------------------- /resources/views/backend/auth/user/deactivated.blade.php: -------------------------------------------------------------------------------- 1 | @extends('backend.layouts.app') 2 | 3 | @section('title', __('Deactivated Users')) 4 | 5 | @section('breadcrumb-links') 6 | @include('backend.auth.user.includes.breadcrumb-links') 7 | @endsection 8 | 9 | @section('content') 10 | 11 | 12 | @lang('Deactivated Users') 13 | 14 | 15 | 16 | 17 | 18 | 19 | @endsection 20 | -------------------------------------------------------------------------------- /resources/views/backend/auth/user/deleted.blade.php: -------------------------------------------------------------------------------- 1 | @extends('backend.layouts.app') 2 | 3 | @section('title', __('Deleted Users')) 4 | 5 | @section('breadcrumb-links') 6 | @include('backend.auth.user.includes.breadcrumb-links') 7 | @endsection 8 | 9 | @section('content') 10 | 11 | 12 | @lang('Deleted Users') 13 | 14 | 15 | 16 | 17 | 18 | 19 | @endsection 20 | -------------------------------------------------------------------------------- /resources/views/backend/auth/user/includes/2fa.blade.php: -------------------------------------------------------------------------------- 1 | @if ($user->hasTwoFactorEnabled()) 2 | @lang('Yes') 3 | @else 4 | @lang('No') 5 | @endif 6 | -------------------------------------------------------------------------------- /resources/views/backend/auth/user/includes/breadcrumb-links.blade.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | @if ($logged_in_user->hasAllAccess()) 8 | 9 | @endif 10 | -------------------------------------------------------------------------------- /resources/views/backend/auth/user/includes/row.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @include('backend.auth.user.includes.type', ['user' => $row]) 3 | 4 | 5 | 6 | {{ $row->name }} 7 | 8 | 9 | 10 | {{ $row->email }} 11 | 12 | 13 | 14 | @include('backend.auth.user.includes.verified', ['user' => $row]) 15 | 16 | 17 | 18 | @include('backend.auth.user.includes.2fa', ['user' => $row]) 19 | 20 | 21 | 22 | {!! $row->roles_label !!} 23 | 24 | 25 | 26 | {!! $row->permissions_label !!} 27 | 28 | 29 | 30 | @include('backend.auth.user.includes.actions', ['user' => $row]) 31 | 32 | -------------------------------------------------------------------------------- /resources/views/backend/auth/user/includes/status.blade.php: -------------------------------------------------------------------------------- 1 | @if($user->isActive()) 2 | @lang('Active') 3 | @else 4 | @lang('Inactive') 5 | @endif 6 | -------------------------------------------------------------------------------- /resources/views/backend/auth/user/includes/type.blade.php: -------------------------------------------------------------------------------- 1 | @if ($user->isAdmin()) 2 | @lang('Administrator') 3 | @elseif ($user->isUser()) 4 | @lang('User') 5 | @else 6 | @lang('N/A') 7 | @endif 8 | -------------------------------------------------------------------------------- /resources/views/backend/auth/user/includes/verified.blade.php: -------------------------------------------------------------------------------- 1 | @if ($user->isVerified()) 2 | @lang('Yes') 3 | @else 4 | @lang('No') 5 | @endif 6 | -------------------------------------------------------------------------------- /resources/views/backend/auth/user/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('backend.layouts.app') 2 | 3 | @section('title', __('User Management')) 4 | 5 | @section('breadcrumb-links') 6 | @include('backend.auth.user.includes.breadcrumb-links') 7 | @endsection 8 | 9 | @section('content') 10 | 11 | 12 | @lang('User Management') 13 | 14 | 15 | @if ($logged_in_user->hasAllAccess()) 16 | 17 | 23 | 24 | @endif 25 | 26 | 27 | 28 | 29 | 30 | @endsection 31 | -------------------------------------------------------------------------------- /resources/views/backend/dashboard.blade.php: -------------------------------------------------------------------------------- 1 | @extends('backend.layouts.app') 2 | 3 | @section('title', __('Dashboard')) 4 | 5 | @section('content') 6 | 7 | 8 | @lang('Welcome :Name', ['name' => $logged_in_user->name]) 9 | 10 | 11 | 12 | @lang('Welcome to the Dashboard') 13 | 14 | 15 | @endsection 16 | -------------------------------------------------------------------------------- /resources/views/backend/includes/footer.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | @lang('Copyright') © {{ date('Y') }} 5 | 6 | 7 | 8 | @lang('All Rights Reserved') 9 |
10 | 11 |
12 | @lang('Powered by') 13 | & 14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /resources/views/backend/includes/partials/breadcrumbs.blade.php: -------------------------------------------------------------------------------- 1 | @if (Breadcrumbs::has()) 2 | 15 | @endif 16 | -------------------------------------------------------------------------------- /resources/views/components/backend/card.blade.php: -------------------------------------------------------------------------------- 1 |
2 | @if (isset($header)) 3 |
4 | {{ $header }} 5 | 6 | @if (isset($headerActions)) 7 |
8 | {{ $headerActions }} 9 |
10 | @endif 11 |
12 | @endif 13 | 14 | @if (isset($body)) 15 |
16 | {{ $body }} 17 |
18 | @endif 19 | 20 | @if (isset($footer)) 21 | 24 | @endif 25 |
26 | -------------------------------------------------------------------------------- /resources/views/components/forms/delete.blade.php: -------------------------------------------------------------------------------- 1 |
merge(['action' => '#', 'class' => 'form-horizontal']) }}> 2 | @csrf 3 | @method('delete') 4 | 5 | {{ $slot }} 6 |
7 | -------------------------------------------------------------------------------- /resources/views/components/forms/get.blade.php: -------------------------------------------------------------------------------- 1 |
merge(['action' => '#', 'class' => 'form-horizontal']) }}> 2 | {{ $slot }} 3 |
4 | -------------------------------------------------------------------------------- /resources/views/components/forms/patch.blade.php: -------------------------------------------------------------------------------- 1 |
merge(['action' => '#', 'class' => 'form-horizontal']) }}> 2 | @csrf 3 | @method('patch') 4 | 5 | {{ $slot }} 6 |
7 | -------------------------------------------------------------------------------- /resources/views/components/forms/post.blade.php: -------------------------------------------------------------------------------- 1 |
merge(['action' => '#', 'class' => 'form-horizontal']) }}> 2 | @csrf 3 | 4 | {{ $slot }} 5 |
6 | -------------------------------------------------------------------------------- /resources/views/components/frontend/card.blade.php: -------------------------------------------------------------------------------- 1 |
2 | @if (isset($header)) 3 |
4 | {{ $header }} 5 | 6 | @if (isset($headerActions)) 7 |
8 | {{ $headerActions }} 9 |
10 | @endif 11 |
12 | @endif 13 | 14 | @if (isset($body)) 15 |
16 | {{ $body }} 17 |
18 | @endif 19 | 20 | @if (isset($footer)) 21 | 24 | @endif 25 |
26 | -------------------------------------------------------------------------------- /resources/views/components/frontend/two-factor-authentication.blade.php: -------------------------------------------------------------------------------- 1 |
2 | @error('code') 3 | 4 | {{ $message }} 5 | 6 | @enderror 7 | 8 |
9 |
10 | 11 | 12 |
13 | 22 |
23 |
24 | 25 |
26 |
27 | 28 |
29 |
30 |
31 |
32 | -------------------------------------------------------------------------------- /resources/views/components/utils/alert.blade.php: -------------------------------------------------------------------------------- 1 | @props(['dismissable' => true, 'type' => 'success', 'ariaLabel' => __('Close')]) 2 | 3 |
merge(['class' => 'alert alert-'.$type]) }} role="alert"> 4 | @if ($dismissable) 5 | 8 | @endif 9 | 10 | {{ $slot }} 11 |
12 | -------------------------------------------------------------------------------- /resources/views/components/utils/delete-button.blade.php: -------------------------------------------------------------------------------- 1 | @props(['href' => '#', 'text' => __('Delete'), 'permission' => false]) 2 | 3 | 10 | {{ $text }} 11 | 12 | -------------------------------------------------------------------------------- /resources/views/components/utils/edit-button.blade.php: -------------------------------------------------------------------------------- 1 | @props(['href' => '#', 'permission' => false]) 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/views/components/utils/form-button.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'action' => '#', 3 | 'method' => 'POST', 4 | 'name' => '', 5 | 'formClass' => 'd-inline', 6 | 'buttonClass' => '', 7 | 'icon' => false, 8 | 'permission' => false, 9 | ]) 10 | 11 | @if ($permission) 12 | @if ($logged_in_user->can($permission)) 13 |
14 | @csrf 15 | @method($method) 16 | 17 | 20 |
21 | @endif 22 | @else 23 |
24 | @csrf 25 | @method($method) 26 | 27 | 30 |
31 | @endif 32 | -------------------------------------------------------------------------------- /resources/views/components/utils/link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active' => '', 'text' => '', 'hide' => false, 'icon' => false, 'permission' => false]) 2 | 3 | @if ($permission) 4 | @if ($logged_in_user->can($permission)) 5 | @if (!$hide) 6 | merge(['href' => '#', 'class' => $active]) }}>@if ($icon) @endif{{ strlen($text) ? $text : $slot }} 7 | @endif 8 | @endif 9 | @else 10 | @if (!$hide) 11 | merge(['href' => '#', 'class' => $active]) }}>@if ($icon) @endif{{ strlen($text) ? $text : $slot }} 12 | @endif 13 | @endif 14 | -------------------------------------------------------------------------------- /resources/views/components/utils/view-button.blade.php: -------------------------------------------------------------------------------- 1 | @props(['href' => '#', 'permission' => false]) 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/views/errors/401.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Unauthorized')) 4 | @section('code', '401') 5 | @section('message', __('Unauthorized')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/403.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Forbidden')) 4 | @section('code', '403') 5 | @section('message', __($exception->getMessage() ?: 'Forbidden')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/404.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Not Found')) 4 | @section('code', '404') 5 | @section('message', __('Not Found')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/419.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Page Expired')) 4 | @section('code', '419') 5 | @section('message', __('Page Expired')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/429.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Too Many Requests')) 4 | @section('code', '429') 5 | @section('message', __('Too Many Requests')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/500.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Server Error')) 4 | @section('code', '500') 5 | @section('message', __('Server Error')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Service Unavailable')) 4 | @section('code', '503') 5 | @section('message', __($exception->getMessage() ?: 'Service Unavailable')) 6 | -------------------------------------------------------------------------------- /resources/views/frontend/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('frontend.layouts.app') 2 | 3 | @section('title', __('Verify Your E-mail Address')) 4 | 5 | @section('content') 6 |
7 |
8 |
9 | 10 | 11 | @lang('Verify Your E-mail Address') 12 | 13 | 14 | 15 | @lang('Before proceeding, please check your email for a verification link.') 16 | @lang('If you did not receive the email') 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
25 |
26 | @endsection 27 | -------------------------------------------------------------------------------- /resources/views/frontend/includes/partials/breadcrumbs.blade.php: -------------------------------------------------------------------------------- 1 | @if (Breadcrumbs::has() && !Route::is('frontend.index')) 2 | 17 | @endif 18 | -------------------------------------------------------------------------------- /resources/views/frontend/user/account/tabs/two-factor-authentication.blade.php: -------------------------------------------------------------------------------- 1 | @if ($logged_in_user->hasTwoFactorEnabled()) 2 |

@lang('Two Factor Authentication is Enabled')

3 | 4 | @lang('Remove Two Factor Authentication') 5 | @lang('View/Regenerate Recovery Codes') 6 | @else 7 |

@lang('Two Factor Authentication is Disabled')

8 | 9 | @lang('Enable Two Factor Authentication') 10 | @endif 11 | -------------------------------------------------------------------------------- /resources/views/frontend/user/dashboard.blade.php: -------------------------------------------------------------------------------- 1 | @extends('frontend.layouts.app') 2 | 3 | @section('title', __('Dashboard')) 4 | 5 | @section('content') 6 |
7 |
8 |
9 | 10 | 11 | @lang('Dashboard') 12 | 13 | 14 | 15 | @lang('You are logged in!') 16 | 17 | 18 |
19 |
20 |
21 | @endsection 22 | -------------------------------------------------------------------------------- /resources/views/includes/partials/announcements.blade.php: -------------------------------------------------------------------------------- 1 | @if($announcements->count()) 2 | @foreach($announcements as $announcement) 3 | 4 | {{ (new \Illuminate\Support\HtmlString($announcement->message)) }} 5 | 6 | @endforeach 7 | @endif 8 | -------------------------------------------------------------------------------- /resources/views/includes/partials/lang.blade.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /resources/views/includes/partials/logged-in-as.blade.php: -------------------------------------------------------------------------------- 1 | @impersonating 2 |
3 | @lang('You are currently logged in as :name.', ['name' => $logged_in_user->name]) @lang('Return to your account'). 4 |
5 | @endImpersonating 6 | -------------------------------------------------------------------------------- /resources/views/includes/partials/read-only.blade.php: -------------------------------------------------------------------------------- 1 | @readonly 2 | 3 | @lang('The Application is currently in read only mode. All requests other than GET are disabled.') 4 | 5 | @endreadonly 6 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | // return $request->user(); 18 | //}); 19 | -------------------------------------------------------------------------------- /routes/backend/admin.php: -------------------------------------------------------------------------------- 1 | name('dashboard') 10 | ->breadcrumbs(function (Trail $trail) { 11 | $trail->push(__('Home'), route('admin.dashboard')); 12 | }); 13 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | //}); 17 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | //})->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /routes/frontend/home.php: -------------------------------------------------------------------------------- 1 | name('index') 13 | ->breadcrumbs(function (Trail $trail) { 14 | $trail->push(__('Home'), route('frontend.index')); 15 | }); 16 | 17 | Route::get('terms', [TermsController::class, 'index']) 18 | ->name('pages.terms') 19 | ->breadcrumbs(function (Trail $trail) { 20 | $trail->parent('frontend.index') 21 | ->push(__('Terms & Conditions'), route('frontend.pages.terms')); 22 | }); 23 | -------------------------------------------------------------------------------- /routes/frontend/user.php: -------------------------------------------------------------------------------- 1 | 'user.', 'middleware' => ['auth', 'password.expires', config('boilerplate.access.middleware.verified')]], function () { 14 | Route::get('dashboard', [DashboardController::class, 'index']) 15 | ->middleware('is_user') 16 | ->name('dashboard') 17 | ->breadcrumbs(function (Trail $trail) { 18 | $trail->parent('frontend.index') 19 | ->push(__('Dashboard'), route('frontend.user.dashboard')); 20 | }); 21 | 22 | Route::get('account', [AccountController::class, 'index']) 23 | ->name('account') 24 | ->breadcrumbs(function (Trail $trail) { 25 | $trail->parent('frontend.index') 26 | ->push(__('My Account'), route('frontend.user.account')); 27 | }); 28 | 29 | Route::patch('profile/update', [ProfileController::class, 'update'])->name('profile.update'); 30 | }); 31 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('locale.change'); 13 | 14 | /* 15 | * Frontend Routes 16 | */ 17 | Route::group(['as' => 'frontend.'], function () { 18 | includeRouteFiles(__DIR__.'/frontend/'); 19 | }); 20 | 21 | /* 22 | * Backend Routes 23 | * 24 | * These routes can only be accessed by users with type `admin` 25 | */ 26 | Route::group(['prefix' => 'admin', 'as' => 'admin.', 'middleware' => 'admin'], function () { 27 | includeRouteFiles(__DIR__.'/backend/'); 28 | }); 29 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $uri = urldecode( 9 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 10 | ); 11 | 12 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 13 | // built-in PHP web server. This provides a convenient way to test a Laravel 14 | // application without having installed a "real" web server software here. 15 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 16 | return false; 17 | } 18 | 19 | require_once __DIR__.'/public/index.php'; 20 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/Backend/DashboardTest.php: -------------------------------------------------------------------------------- 1 | get('/admin/dashboard')->assertRedirect('/login'); 20 | } 21 | 22 | /** @test */ 23 | public function not_authorized_users_cant_access_admin_dashboard() 24 | { 25 | $this->actingAs(User::factory()->user()->create()); 26 | 27 | $response = $this->get('/admin/dashboard'); 28 | 29 | $response->assertRedirect('/'); 30 | 31 | $response->assertSessionHas('flash_danger', __('You do not have access to do that.')); 32 | } 33 | 34 | /** @test */ 35 | public function admin_can_access_admin_dashboard() 36 | { 37 | $this->loginAsAdmin(); 38 | 39 | $this->get('/admin/dashboard')->assertOk(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/Feature/Backend/Role/ListRoleTest.php: -------------------------------------------------------------------------------- 1 | loginAsAdmin(); 20 | 21 | $this->get('/admin/auth/role')->assertOk(); 22 | } 23 | 24 | /** @test */ 25 | public function only_admin_can_view_roles() 26 | { 27 | $this->actingAs(User::factory()->admin()->create()); 28 | 29 | $response = $this->get('/admin/auth/role'); 30 | 31 | $response->assertSessionHas('flash_danger', __('You do not have access to do that.')); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/Feature/Frontend/ConfirmationTest.php: -------------------------------------------------------------------------------- 1 | create(); 17 | 18 | $this->actingAs($user); 19 | 20 | $this->get('/password/confirm')->assertOk(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/Frontend/DashboardTest.php: -------------------------------------------------------------------------------- 1 | get('/dashboard')->assertRedirect('/login'); 17 | 18 | $this->actingAs(User::factory()->user()->create()); 19 | 20 | $this->get('/dashboard')->assertOk(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/Frontend/HomeTest.php: -------------------------------------------------------------------------------- 1 | get('/')->assertOk(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/Feature/Frontend/LogoutTest.php: -------------------------------------------------------------------------------- 1 | actingAs($user = User::factory()->create()); 17 | 18 | $this->assertAuthenticatedAs($user); 19 | 20 | $this->post('/logout')->assertRedirect('/'); 21 | 22 | $this->assertFalse($this->isAuthenticated()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/Feature/Frontend/VerificationTest.php: -------------------------------------------------------------------------------- 1 | unconfirmed()->create(); 19 | 20 | $this->actingAs($user); 21 | 22 | $this->get('/dashboard')->assertRedirect('/email/verify'); 23 | } 24 | 25 | /** @test */ 26 | public function an_unverified_user_cannot_access_account() 27 | { 28 | $user = User::factory()->unconfirmed()->create(); 29 | 30 | $this->actingAs($user); 31 | 32 | $this->get('/account')->assertRedirect('/email/verify'); 33 | } 34 | 35 | /** @test */ 36 | public function a_user_can_resend_the_verification_email() 37 | { 38 | Notification::fake(); 39 | 40 | $user = User::factory()->unconfirmed()->create(); 41 | 42 | $this->actingAs($user); 43 | 44 | $this->get('/account')->assertRedirect('/email/verify'); 45 | 46 | $this->post('/email/resend'); 47 | 48 | Notification::assertSentTo($user, VerifyEmail::class); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /tests/Feature/Middleware/SwitchLanguageTest.php: -------------------------------------------------------------------------------- 1 | get('/lang/de'); 16 | 17 | $response->assertSessionHas('locale', 'de'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/Feature/Middleware/ToBeLoggedOutTest.php: -------------------------------------------------------------------------------- 1 | user()->create(['to_be_logged_out' => false]); 17 | 18 | $this->actingAs($user); 19 | 20 | $this->get('/dashboard')->assertOk(); 21 | 22 | $user->update(['to_be_logged_out' => true]); 23 | 24 | $this->get('/dashboard')->assertRedirect('/login'); 25 | 26 | $this->assertFalse($this->isAuthenticated()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.setPublicPath('public') 15 | .setResourceRoot('../') // Turns assets paths in css relative to css file 16 | .vue() 17 | .sass('resources/sass/frontend/app.scss', 'css/frontend.css') 18 | .sass('resources/sass/backend/app.scss', 'css/backend.css') 19 | .js('resources/js/frontend/app.js', 'js/frontend.js') 20 | .js('resources/js/backend/app.js', 'js/backend.js') 21 | .extract([ 22 | 'alpinejs', 23 | 'jquery', 24 | 'bootstrap', 25 | 'popper.js', 26 | 'axios', 27 | 'sweetalert2', 28 | 'lodash' 29 | ]) 30 | .sourceMaps(); 31 | 32 | if (mix.inProduction()) { 33 | mix.version(); 34 | } else { 35 | // Uses inline source-maps on development 36 | mix.webpackConfig({ 37 | devtool: 'inline-source-map' 38 | }); 39 | } 40 | --------------------------------------------------------------------------------