daevin 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Daevin_test/.editorconfig +15 -0
- package/Daevin_test/.env.example +92 -0
- package/Daevin_test/.gitattributes +10 -0
- package/Daevin_test/CODE_OF_CONDUCT.md +3 -0
- package/Daevin_test/CONTRIBUTING.md +3 -0
- package/Daevin_test/LICENSE +21 -0
- package/Daevin_test/README.md +314 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ApiLoginProxyForWebClientAction.php +52 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ApiLogoutAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ApiRefreshProxyForWebClientAction.php +47 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ForgotPasswordAction.php +43 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/GetAuthenticatedUserAction.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/RegisterUserAction.php +39 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ResetPasswordAction.php +61 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/SendVerificationEmailAction.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/VerifyEmailAction.php +43 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/WebLoginAction.php +46 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/WebLogoutAction.php +17 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Classes/LoginCustomAttribute.php +97 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Configs/appSection-authentication.php +117 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/EmailNotVerifiedException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/InvalidEmailVerificationDataException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/InvalidResetPasswordTokenException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/LoginFailedException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/RefreshTokenMissingException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Mails/ForgotPassword.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Mails/Templates/forgot-password.blade.php +73 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Middlewares/RedirectIfAuthenticated.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Notifications/EmailVerified.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Notifications/PasswordReset.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Notifications/VerifyEmail.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Notifications/Welcome.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Providers/AuthServiceProvider.php +76 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Providers/MainServiceProvider.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Providers/MiddlewareServiceProvider.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/README.md +1 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/CallOAuthServerTask.php +36 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/CreatePasswordResetTokenTask.php +14 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/CreateUserByCredentialsTask.php +34 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/LoginTask.php +14 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/MakeRefreshCookieTask.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/SendVerificationEmailTask.php +16 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Stubs/oauth-private.key +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Stubs/oauth-public.key +14 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/TestCase.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/CreatePasswordResetTokenTaskTest.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/CreateUserByCredentialsTaskTest.php +42 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/ForgotPasswordActionTest.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/LoginCustomAttributeTest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/RedirectIfAuthenticatedMiddlewareTest.php +44 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/RegisterUserActionTest.php +64 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/ResetPasswordActionTest.php +83 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/SendVerificationEmailTaskTest.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/WebLoginActionTest.php +75 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Traits/AuthenticationTrait.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/ForgotPasswordController.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/GetAuthenticatedUserController.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/LoginProxyForWebClientController.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/LogoutController.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/RefreshProxyForWebClientController.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/RegisterUserController.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/ResetPasswordController.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/SendVerificationEmailController.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/VerifyEmailController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/ForgotPasswordRequest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/GetAuthenticatedUserRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php +57 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/RegisterUserRequest.php +61 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/ResetPasswordRequest.php +55 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/SendVerificationEmailRequest.php +56 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/VerifyEmailRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/ForgotPassword.v1.public.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/GetAuthenticatedUser.v1.private.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/LoginProxyForWebClient.v1.public.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingCredentialGrant.v1.public.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingPasswordGrant.v1.private.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/Logout.v1.public.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/RefreshProxyForWebClient.v1.public.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/RegisterUser.v1.private.php +38 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/ResetPassword.v1.public.php +37 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/SendVerificationEmail.v1.public.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/VerifyEmail.v1.public.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/ApiTestCase.php +74 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ApiLoginProxyForWebClientTest.php +129 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ApiLogoutTest.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ApiRefreshProxyForWebClientTest.php +86 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ForgotPasswordTest.php +56 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/GetAuthenticatedUserTest.php +76 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/RegisterUserTest.php +208 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ResetPasswordTest.php +79 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/SendVerificationEmailTest.php +95 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/Stubs/oauth-private.key +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/Stubs/oauth-public.key +14 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/VerifyEmailTest.php +84 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LoginController.php +39 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LogoutController.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Requests/LoginRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Requests/LogoutRequest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Routes/GetLogin.v1.public.php +8 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Routes/PostLogin.v1.public.php +8 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Routes/PostLogout.php +7 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Views/login.blade.php +121 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/composer.json +11 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/AssignRolesToUserAction.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/AttachPermissionsToRoleAction.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/AttachPermissionsToUserAction.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/CreatePermissionAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/CreateRoleAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/DeleteRoleAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/DetachPermissionsFromRoleAction.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/DetachPermissionsFromUserAction.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/FindPermissionAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/FindRoleAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetAllPermissionsAction.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetAllRolesAction.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetRolePermissionsAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetUserPermissionsAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetUserRolesAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/RevokeRolesFromUserAction.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/SyncPermissionsOnRoleAction.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/SyncUserRolesAction.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Configs/appSection-authorization.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Configs/permission.php +161 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Factories/PermissionFactory.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Factories/RoleFactory.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Migrations/2016_12_29_201047_create_permission_tables.php +141 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122453_add_extra_fields_to_permissions_tale.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122522_add_extra_fields_to_roles_table.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Repositories/PermissionRepository.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Repositories/RoleRepository.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php +36 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationGivePermissionsToRolesSeeder_3.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationPermissionsSeeder_1.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationRolesSeeder_2.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Models/Permission.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Models/Role.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Providers/MainServiceProvider.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/README.md +1 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/AssignRolesToUserTask.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/CreatePermissionTask.php +41 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/CreateRoleTask.php +41 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/DeleteRoleTask.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/DetachPermissionsFromRoleTask.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/DetachPermissionsFromUserTask.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/FindPermissionTask.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/FindRoleTask.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/GetAllPermissionsTask.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/GetAllRolesTask.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/RevokeRoleFromUserTask.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/TestCase.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/CreatePermissionTaskTest.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/CreateRoleTaskTest.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/DeleteRoleTaskTest.php +36 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/FindPermissionTaskTest.php +44 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/FindRoleTaskTest.php +44 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/PermissionFactoryTest.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/PermissionMigrationTest.php +95 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/RoleFactoryTest.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Traits/AuthorizationTrait.php +11 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Traits/IsResourceOwnerTrait.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/AssignRolesToUserController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/AttachPermissionsToRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/AttachPermissionsToUserController.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/CreateRoleController.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/DeleteRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/DetachPermissionsFromRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/DetachPermissionsFromUserController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/FindPermissionController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/FindRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllPermissionsController.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllRolesController.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetRolePermissionsController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetUserPermissionsController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetUserRolesController.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/RevokeRolesFromUserController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncPermissionOnRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncUserRolesController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToUserRequest.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php +47 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromUserRequest.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetRolePermissionsRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetUserPermissionsRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetUserRolesRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/AssignRolesToUser.v1.private.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/AttachPermissionsToRole.v1.private.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/AttachPermissionsToUser.v1.private.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/CreateRole.v1.private.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/DeleteRole.v1.private.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/DetachPermissionsFromRole.v1.private.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/DetachPermissionsFromUser.v1.private.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/FindPermission.v1.private.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/FindRole.v1.private.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllPermissions.v1.private.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllRoles.v1.private.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetRolePermissions.v1.private.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetUserPermissions.v1.private.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetUserRoles.v1.private.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/RevokeRolesFromUser.v1.private.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/SyncPermissionOnRole.v1.private.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/SyncUserRoles.v1.private.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/_permission.v1.public.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/_role.v1.public.php +43 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/_userPermissions.v1.public.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/ApiTestCase.php +15 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AssignRolesToUserTest.php +71 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AttachPermissionToUserTest.php +114 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AttachPermissionsToRoleTest.php +115 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/CreateRoleTest.php +65 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DeleteRoleTest.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DetachPermissionFromUserTest.php +120 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DetachPermissionsFromRoleTest.php +115 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/FindPermissionTest.php +42 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/FindRoleTest.php +42 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetAllPermissionsTest.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetAllRolesTest.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetRolePermissionsTest.php +39 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetUserPermissionsTest.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetUserRolesTest.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/RevokeRolesFromUserTest.php +115 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/SyncPermissionsOnRoleTest.php +92 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/SyncUserRolesTest.php +93 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Transformers/PermissionTransformer.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Transformers/RoleTransformer.php +34 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/WEB/Controllers/UnauthorizedController.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/WEB/Requests/UnauthorizedRequest.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/WEB/Routes/GetUnauthorized.php +7 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/WEB/Views/unauthorized.blade.php +43 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/composer.json +11 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/CreatePostsAction.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/DeletePostsAction.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/FindPostsByIdAction.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/GetAllPostsAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/UpdatePostsAction.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Configs/appSection-posts.php +14 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Data/Factories/PostsFactory.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Data/Migrations/2023_2_19_55939_create_posts_migration.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Data/Repositories/PostsRepository.php +17 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Models/Posts.php +42 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Posts.json +7 -0
- package/Daevin_test/app/Containers/AppSection/Posts/README.md +194 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/CreatePostsTask.php +34 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/DeletePostsTask.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/FindPostsByIdTask.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/GetAllPostsTask.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/UpdatePostsTask.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Controllers/Controller.php +94 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/CreatePostsRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/DeletePostsRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/FindPostsByIdRequest.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/GetAllPostsRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/UpdatePostsRequest.php +56 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/CreatePostsRoute.v1.private.php +52 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/DeletePostsRoute.v1.private.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/FindPostsByIdRoute.v1.private.php +52 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/GetAllPostsRoute.v1.private.php +74 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/UpdatePostsRoute.v1.private.php +52 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Transformers/PostsTransformer.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Posts/composer.json +7 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/CreateAdminAction.php +39 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/DeleteUserAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/FindUserByIdAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/GetAllUsersAction.php +21 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/UpdateUserAction.php +33 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/UpdateUserPasswordAction.php +35 -0
- package/Daevin_test/app/Containers/AppSection/User/Configs/appSection-user.php +5 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Factories/UserFactory.php +44 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000001_create_users_table.php +34 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000002_create_password_resets_table.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Repositories/UserRepository.php +21 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Seeders/UserPermissionsSeeder_1.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/Models/User.php +58 -0
- package/Daevin_test/app/Containers/AppSection/User/Notifications/PasswordUpdatedNotification.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/Providers/MainServiceProvider.php +39 -0
- package/Daevin_test/app/Containers/AppSection/User/README.md +1 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/DeleteUserTask.php +35 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/FindUserByEmailTask.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/FindUserByIdTask.php +31 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/GetAllUsersTask.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/UpdateUserTask.php +42 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/TestCase.php +18 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/CreateAdminActionTest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/DeleteUserTaskTest.php +35 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/FindUserByIdTaskTest.php +35 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/PasswordResetsMigrationTest.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/UpdateUserTaskTest.php +52 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/UserFactoryTest.php +36 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/UsersMigrationTest.php +34 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/DeleteUserController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/FindUserByIdController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/GetAllUsersController.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/UpdateUserController.php +30 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/UpdateUserPasswordController.php +30 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/DeleteUserRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/GetAllUsersRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/UpdateUserPasswordRequest.php +56 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/UpdateUserRequest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/DeleteUser.v1.private.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php +24 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/GetAllUsers.v1.private.php +23 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/UpdateUser.v1.private.php +27 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/UpdateUserPassword.v1.private.php +36 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/_user.v1.public.php +25 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/ApiTestCase.php +15 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/DeleteUserTest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/FindUserByIdTest.php +80 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/GetAllUsersTest.php +88 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/UpdateUserPasswordTest.php +126 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/UpdateUserTest.php +80 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Transformers/UserTransformer.php +52 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/CLI/Commands/CreateAdminCommand.php +37 -0
- package/Daevin_test/app/Containers/AppSection/User/composer.json +7 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/CreateUsersAction.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/DeleteUsersAction.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/FindUsersByIdAction.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/GetAllUsersAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/UpdateUsersAction.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Users/Configs/appSection-users.php +14 -0
- package/Daevin_test/app/Containers/AppSection/Users/Data/Factories/UsersFactory.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Users/Data/Migrations/2023_2_19_55939_create_users_migration.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Users/Data/Repositories/UsersRepository.php +17 -0
- package/Daevin_test/app/Containers/AppSection/Users/Models/Users.php +44 -0
- package/Daevin_test/app/Containers/AppSection/Users/README.md +194 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/CreateUsersTask.php +34 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/DeleteUsersTask.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/FindUsersByIdTask.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/GetAllUsersTask.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/UpdateUsersTask.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Controllers/Controller.php +94 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/CreateUsersRequest.php +55 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/DeleteUsersRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/FindUsersByIdRequest.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/GetAllUsersRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/UpdateUsersRequest.php +57 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/CreateUsersRoute.v1.private.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/DeleteUsersRoute.v1.private.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/FindUsersByIdRoute.v1.private.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/GetAllUsersRoute.v1.private.php +75 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/UpdateUsersRoute.v1.private.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Transformers/UsersTransformer.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Users/Users.json +7 -0
- package/Daevin_test/app/Containers/AppSection/Users/composer.json +7 -0
- package/Daevin_test/app/Ship/Broadcasts/channels.php +16 -0
- package/Daevin_test/app/Ship/Commands/HelloWorldCommand.php +32 -0
- package/Daevin_test/app/Ship/Commands/closures.php +19 -0
- package/Daevin_test/app/Ship/Configs/apiato.php +185 -0
- package/Daevin_test/app/Ship/Configs/debugbar.php +275 -0
- package/Daevin_test/app/Ship/Configs/fractal.php +43 -0
- package/Daevin_test/app/Ship/Configs/hashids.php +54 -0
- package/Daevin_test/app/Ship/Configs/ide-helper.php +319 -0
- package/Daevin_test/app/Ship/Configs/notification.php +16 -0
- package/Daevin_test/app/Ship/Configs/repository.php +250 -0
- package/Daevin_test/app/Ship/Contracts/MustVerifyEmail.php +14 -0
- package/Daevin_test/app/Ship/Criterias/CreatedTodayCriteria.php +15 -0
- package/Daevin_test/app/Ship/Criterias/GroupByCriteria.php +21 -0
- package/Daevin_test/app/Ship/Criterias/IsNullCriteria.php +21 -0
- package/Daevin_test/app/Ship/Criterias/NotNullCriteria.php +21 -0
- package/Daevin_test/app/Ship/Criterias/OrderByCreationDateAscendingCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/OrderByCreationDateDescendingCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/OrderByFieldCriteria.php +37 -0
- package/Daevin_test/app/Ship/Criterias/OrderByNameCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/OrderByUpdateDateAscendingCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/OrderByUpdateDateDescendingCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/ThisBetweenDatesCriteria.php +21 -0
- package/Daevin_test/app/Ship/Criterias/ThisEqualThatCriteria.php +20 -0
- package/Daevin_test/app/Ship/Criterias/ThisLikeThatCriteria.php +35 -0
- package/Daevin_test/app/Ship/Criterias/ThisUserCriteria.php +19 -0
- package/Daevin_test/app/Ship/Events/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Exceptions/CreateResourceFailedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/DeleteResourceFailedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/EmailIsMissedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/Handlers/ExceptionsHandler.php +107 -0
- package/Daevin_test/app/Ship/Exceptions/InternalErrorException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/NotAuthorizedResourceException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/NotFoundException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/NotImplementedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/UnsupportedFractalSerializerException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/UpdateResourceFailedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/ValidationFailedException.php +12 -0
- package/Daevin_test/app/Ship/Generators/CustomStubs/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Helpers/helpers.php +12 -0
- package/Daevin_test/app/Ship/Kernels/ConsoleKernel.php +46 -0
- package/Daevin_test/app/Ship/Kernels/HttpKernel.php +113 -0
- package/Daevin_test/app/Ship/Listeners/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Mails/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Mails/Templates/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Middlewares/Authenticate.php +16 -0
- package/Daevin_test/app/Ship/Middlewares/EncryptCookies.php +17 -0
- package/Daevin_test/app/Ship/Middlewares/PreventRequestsDuringMaintenance.php +17 -0
- package/Daevin_test/app/Ship/Middlewares/TrimStrings.php +19 -0
- package/Daevin_test/app/Ship/Middlewares/TrustHosts.php +20 -0
- package/Daevin_test/app/Ship/Middlewares/TrustProxies.php +28 -0
- package/Daevin_test/app/Ship/Middlewares/VerifyCsrfToken.php +17 -0
- package/Daevin_test/app/Ship/Migrations/2017_09_12_174826_create_notifications_table.php +35 -0
- package/Daevin_test/app/Ship/Migrations/2019_08_19_000000_create_failed_jobs_table.php +36 -0
- package/Daevin_test/app/Ship/Migrations/2021_03_01_150940_create_jobs_table.php +39 -0
- package/Daevin_test/app/Ship/Notifications/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Parents/Actions/Action.php +10 -0
- package/Daevin_test/app/Ship/Parents/Actions/SubAction.php +10 -0
- package/Daevin_test/app/Ship/Parents/Commands/ConsoleCommand.php +10 -0
- package/Daevin_test/app/Ship/Parents/Controllers/ApiController.php +10 -0
- package/Daevin_test/app/Ship/Parents/Controllers/WebController.php +10 -0
- package/Daevin_test/app/Ship/Parents/Criterias/Criteria.php +10 -0
- package/Daevin_test/app/Ship/Parents/Events/Event.php +10 -0
- package/Daevin_test/app/Ship/Parents/Exceptions/Exception.php +10 -0
- package/Daevin_test/app/Ship/Parents/Factories/Factory.php +10 -0
- package/Daevin_test/app/Ship/Parents/Jobs/Job.php +25 -0
- package/Daevin_test/app/Ship/Parents/Listeners/Listener.php +10 -0
- package/Daevin_test/app/Ship/Parents/Mails/Mail.php +10 -0
- package/Daevin_test/app/Ship/Parents/Middlewares/Middleware.php +10 -0
- package/Daevin_test/app/Ship/Parents/Models/Model.php +11 -0
- package/Daevin_test/app/Ship/Parents/Models/UserModel.php +17 -0
- package/Daevin_test/app/Ship/Parents/Notifications/Notification.php +10 -0
- package/Daevin_test/app/Ship/Parents/Policies/Policy.php +26 -0
- package/Daevin_test/app/Ship/Parents/Providers/AuthServiceProvider.php +20 -0
- package/Daevin_test/app/Ship/Parents/Providers/BroadcastServiceProvider.php +26 -0
- package/Daevin_test/app/Ship/Parents/Providers/EventServiceProvider.php +40 -0
- package/Daevin_test/app/Ship/Parents/Providers/MainServiceProvider.php +24 -0
- package/Daevin_test/app/Ship/Parents/Providers/MiddlewareServiceProvider.php +16 -0
- package/Daevin_test/app/Ship/Parents/Providers/RouteServiceProvider.php +24 -0
- package/Daevin_test/app/Ship/Parents/Repositories/Repository.php +10 -0
- package/Daevin_test/app/Ship/Parents/Requests/Request.php +10 -0
- package/Daevin_test/app/Ship/Parents/Seeders/Seeder.php +10 -0
- package/Daevin_test/app/Ship/Parents/Tasks/Task.php +10 -0
- package/Daevin_test/app/Ship/Parents/Tests/PhpUnit/TestCase.php +51 -0
- package/Daevin_test/app/Ship/Parents/Transformers/Transformer.php +25 -0
- package/Daevin_test/app/Ship/Parents/Values/Value.php +9 -0
- package/Daevin_test/app/Ship/Providers/RouteServiceProvider.php +35 -0
- package/Daevin_test/app/Ship/Providers/ShipProvider.php +44 -0
- package/Daevin_test/app/Ship/Seeders/SeedDeploymentData.php +18 -0
- package/Daevin_test/app/Ship/Seeders/SeedTestingData.php +18 -0
- package/Daevin_test/app/Ship/Tests/TestCase.php +10 -0
- package/Daevin_test/app/Ship/composer.json +21 -0
- package/Daevin_test/artisan +53 -0
- package/Daevin_test/bootstrap/app.php +55 -0
- package/Daevin_test/bootstrap/cache/.gitignore +2 -0
- package/Daevin_test/composer.json +112 -0
- package/Daevin_test/composer.lock +12696 -0
- package/Daevin_test/config/app.php +206 -0
- package/Daevin_test/config/auth.php +117 -0
- package/Daevin_test/config/broadcasting.php +67 -0
- package/Daevin_test/config/cache.php +110 -0
- package/Daevin_test/config/cors.php +34 -0
- package/Daevin_test/config/database.php +151 -0
- package/Daevin_test/config/filesystems.php +76 -0
- package/Daevin_test/config/hashing.php +52 -0
- package/Daevin_test/config/logging.php +119 -0
- package/Daevin_test/config/mail.php +117 -0
- package/Daevin_test/config/queue.php +93 -0
- package/Daevin_test/config/services.php +34 -0
- package/Daevin_test/config/session.php +201 -0
- package/Daevin_test/config/view.php +36 -0
- package/Daevin_test/database/factories/ModelFactory.php +4 -0
- package/Daevin_test/database/migrations/.gitkeep +0 -0
- package/Daevin_test/database/seeders/DatabaseSeeder.php +24 -0
- package/Daevin_test/lang/ar/auth.php +19 -0
- package/Daevin_test/lang/ar/pagination.php +19 -0
- package/Daevin_test/lang/ar/passwords.php +22 -0
- package/Daevin_test/lang/ar/validation.php +149 -0
- package/Daevin_test/lang/en/auth.php +20 -0
- package/Daevin_test/lang/en/pagination.php +19 -0
- package/Daevin_test/lang/en/passwords.php +22 -0
- package/Daevin_test/lang/en/validation.php +169 -0
- package/Daevin_test/lang/es/auth.php +19 -0
- package/Daevin_test/lang/es/pagination.php +19 -0
- package/Daevin_test/lang/es/passwords.php +22 -0
- package/Daevin_test/lang/es/validation.php +149 -0
- package/Daevin_test/lang/fa/auth.php +18 -0
- package/Daevin_test/lang/fa/pagination.php +17 -0
- package/Daevin_test/lang/fa/passwords.php +20 -0
- package/Daevin_test/lang/fa/validation.php +182 -0
- package/Daevin_test/lang/fr/auth.php +19 -0
- package/Daevin_test/lang/fr/pagination.php +19 -0
- package/Daevin_test/lang/fr/passwords.php +22 -0
- package/Daevin_test/lang/fr/validation.php +149 -0
- package/Daevin_test/package-lock.json +10031 -0
- package/Daevin_test/package.json +19 -0
- package/Daevin_test/php_cs.dist.php +39 -0
- package/Daevin_test/phpspec.yml +5 -0
- package/Daevin_test/phpunit.xml +38 -0
- package/Daevin_test/psalm.dist.xml +18 -0
- package/Daevin_test/public/.htaccess +21 -0
- package/Daevin_test/public/favicon.ico +0 -0
- package/Daevin_test/public/index.php +55 -0
- package/Daevin_test/public/robots.txt +2 -0
- package/Daevin_test/public/web.config +28 -0
- package/Daevin_test/resources/css/app.css +0 -0
- package/Daevin_test/resources/js/app.js +1 -0
- package/Daevin_test/resources/js/bootstrap.js +28 -0
- package/Daevin_test/resources/views/.gitkeep +0 -0
- package/Daevin_test/server.php +21 -0
- package/Daevin_test/storage/app/.gitignore +3 -0
- package/Daevin_test/storage/app/public/.gitignore +2 -0
- package/Daevin_test/storage/debugbar/.gitignore +2 -0
- package/Daevin_test/storage/framework/cache/.gitignore +2 -0
- package/Daevin_test/storage/framework/sessions/.gitignore +2 -0
- package/Daevin_test/storage/framework/testing/.gitignore +2 -0
- package/Daevin_test/storage/framework/views/.gitignore +2 -0
- package/Daevin_test/storage/logs/.gitignore +2 -0
- package/Daevin_test/webpack.mix.js +17 -0
- package/bin/classes/Apiato/index.js +208 -0
- package/bin/classes/Containers/Action.js +169 -0
- package/bin/classes/Containers/ComposerJSON.js +27 -0
- package/bin/classes/Containers/Config.js +39 -0
- package/bin/classes/Containers/Controller.js +120 -0
- package/bin/classes/Containers/Factory.js +47 -0
- package/bin/classes/Containers/Migration.js +80 -0
- package/bin/classes/Containers/Model.js +126 -0
- package/bin/classes/Containers/ReadMe.js +212 -0
- package/bin/classes/Containers/Repository.js +54 -0
- package/bin/classes/Containers/Request.js +341 -0
- package/bin/classes/Containers/Route.js +336 -0
- package/bin/classes/Containers/Task.js +225 -0
- package/bin/classes/Containers/Transformer.js +94 -0
- package/bin/classes/Helpers.js +150 -0
- package/bin/classes/tes.js +0 -0
- package/bin/constants.js +11 -0
- package/bin/core/output.json +13 -0
- package/bin/core/schemaToSql.js +118 -0
- package/bin/core/sqlToSchema.js +206 -0
- package/bin/index.js +103 -0
- package/dbconfig.json +74 -0
- package/package.json +39 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Exceptions\Handlers;
|
4
|
+
|
5
|
+
use Apiato\Core\Abstracts\Exceptions\Exception as CoreException;
|
6
|
+
use Apiato\Core\Exceptions\AuthenticationException as CoreAuthenticationException;
|
7
|
+
use Apiato\Core\Exceptions\Handlers\ExceptionsHandler as CoreExceptionsHandler;
|
8
|
+
use App\Ship\Exceptions\NotAuthorizedResourceException;
|
9
|
+
use App\Ship\Exceptions\NotFoundException;
|
10
|
+
use App\Ship\Providers\RouteServiceProvider;
|
11
|
+
use Illuminate\Auth\AuthenticationException as LaravelAuthenticationException;
|
12
|
+
use Illuminate\Http\JsonResponse;
|
13
|
+
use Psr\Log\LogLevel;
|
14
|
+
use Symfony\Component\HttpFoundation\Response;
|
15
|
+
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
16
|
+
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
17
|
+
use Throwable;
|
18
|
+
|
19
|
+
/**
|
20
|
+
* Class ExceptionsHandler
|
21
|
+
*
|
22
|
+
* A.K.A. (app/Exceptions/Handler.php)
|
23
|
+
*/
|
24
|
+
class ExceptionsHandler extends CoreExceptionsHandler
|
25
|
+
{
|
26
|
+
/**
|
27
|
+
* A list of exception types with their corresponding custom log levels.
|
28
|
+
*
|
29
|
+
* @var array<class-string<Throwable>, LogLevel::*>
|
30
|
+
*/
|
31
|
+
protected $levels = [
|
32
|
+
//
|
33
|
+
];
|
34
|
+
|
35
|
+
/**
|
36
|
+
* A list of the exception types that are not reported.
|
37
|
+
*
|
38
|
+
* @var array<int, class-string<Throwable>>
|
39
|
+
*/
|
40
|
+
protected $dontReport = [
|
41
|
+
//
|
42
|
+
];
|
43
|
+
|
44
|
+
/**
|
45
|
+
* A list of the inputs that are never flashed for validation exceptions.
|
46
|
+
*
|
47
|
+
* @var array<int, string>
|
48
|
+
*/
|
49
|
+
protected $dontFlash = [
|
50
|
+
'current_password',
|
51
|
+
'password',
|
52
|
+
'password_confirmation',
|
53
|
+
];
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Register the exception handling callbacks for the application.
|
57
|
+
*
|
58
|
+
* @return void
|
59
|
+
*/
|
60
|
+
public function register(): void
|
61
|
+
{
|
62
|
+
$this->reportable(static function (Throwable $e) {
|
63
|
+
});
|
64
|
+
|
65
|
+
$this->renderable(function (CoreException $e) {
|
66
|
+
return $this->buildResponse($e);
|
67
|
+
});
|
68
|
+
|
69
|
+
$this->renderable(function (NotFoundHttpException $e) {
|
70
|
+
return $this->buildResponse(new NotFoundException());
|
71
|
+
});
|
72
|
+
|
73
|
+
$this->renderable(function (AccessDeniedHttpException $e, $request) {
|
74
|
+
return $this->shouldReturnJson($request, $e)
|
75
|
+
? $this->buildResponse(new NotAuthorizedResourceException())
|
76
|
+
: redirect()->guest(route(RouteServiceProvider::UNAUTHORIZED));
|
77
|
+
});
|
78
|
+
}
|
79
|
+
|
80
|
+
private function buildResponse(CoreException $e): JsonResponse
|
81
|
+
{
|
82
|
+
if (config('app.debug')) {
|
83
|
+
$response = [
|
84
|
+
'message' => $e->getMessage(),
|
85
|
+
'errors' => $e->getErrors(),
|
86
|
+
'exception' => get_class($e),
|
87
|
+
'file' => $e->getFile(),
|
88
|
+
'line' => $e->getLine(),
|
89
|
+
'trace' => $e->getTrace(),
|
90
|
+
];
|
91
|
+
} else {
|
92
|
+
$response = [
|
93
|
+
'message' => $e->getMessage(),
|
94
|
+
'errors' => $e->getErrors(),
|
95
|
+
];
|
96
|
+
}
|
97
|
+
|
98
|
+
return response()->json($response, (int)$e->getCode());
|
99
|
+
}
|
100
|
+
|
101
|
+
protected function unauthenticated($request, LaravelAuthenticationException $e): JsonResponse|Response
|
102
|
+
{
|
103
|
+
return $this->shouldReturnJson($request, $e)
|
104
|
+
? $this->buildResponse(new CoreAuthenticationException())
|
105
|
+
: redirect()->guest(route(RouteServiceProvider::LOGIN));
|
106
|
+
}
|
107
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Exceptions;
|
4
|
+
|
5
|
+
use App\Ship\Parents\Exceptions\Exception;
|
6
|
+
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
|
7
|
+
|
8
|
+
class InternalErrorException extends Exception
|
9
|
+
{
|
10
|
+
protected $code = SymfonyResponse::HTTP_INTERNAL_SERVER_ERROR;
|
11
|
+
protected $message = 'Something went wrong!';
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Exceptions;
|
4
|
+
|
5
|
+
use App\Ship\Parents\Exceptions\Exception;
|
6
|
+
use Symfony\Component\HttpFoundation\Response;
|
7
|
+
|
8
|
+
class NotAuthorizedResourceException extends Exception
|
9
|
+
{
|
10
|
+
protected $code = Response::HTTP_FORBIDDEN;
|
11
|
+
protected $message = 'You are not authorized to request this resource.';
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Exceptions;
|
4
|
+
|
5
|
+
use App\Ship\Parents\Exceptions\Exception;
|
6
|
+
use Symfony\Component\HttpFoundation\Response;
|
7
|
+
|
8
|
+
class NotFoundException extends Exception
|
9
|
+
{
|
10
|
+
protected $code = Response::HTTP_NOT_FOUND;
|
11
|
+
protected $message = 'The requested Resource was not found.';
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Exceptions;
|
4
|
+
|
5
|
+
use App\Ship\Parents\Exceptions\Exception;
|
6
|
+
use Symfony\Component\HttpFoundation\Response;
|
7
|
+
|
8
|
+
class NotImplementedException extends Exception
|
9
|
+
{
|
10
|
+
protected $code = Response::HTTP_NOT_IMPLEMENTED;
|
11
|
+
protected $message = 'This method is not yet implemented.';
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Exceptions;
|
4
|
+
|
5
|
+
use App\Ship\Parents\Exceptions\Exception;
|
6
|
+
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
|
7
|
+
|
8
|
+
class UnsupportedFractalSerializerException extends Exception
|
9
|
+
{
|
10
|
+
protected $code = SymfonyResponse::HTTP_INTERNAL_SERVER_ERROR;
|
11
|
+
protected $message = 'Unsupported Fractal Serializer!';
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Exceptions;
|
4
|
+
|
5
|
+
use App\Ship\Parents\Exceptions\Exception;
|
6
|
+
use Symfony\Component\HttpFoundation\Response;
|
7
|
+
|
8
|
+
class UpdateResourceFailedException extends Exception
|
9
|
+
{
|
10
|
+
protected $code = Response::HTTP_EXPECTATION_FAILED;
|
11
|
+
protected $message = 'Failed to update Resource.';
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Exceptions;
|
4
|
+
|
5
|
+
use App\Ship\Parents\Exceptions\Exception;
|
6
|
+
use Symfony\Component\HttpFoundation\Response;
|
7
|
+
|
8
|
+
class ValidationFailedException extends Exception
|
9
|
+
{
|
10
|
+
protected $code = Response::HTTP_UNPROCESSABLE_ENTITY;
|
11
|
+
protected $message = 'Invalid Input.';
|
12
|
+
}
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
/*
|
4
|
+
|--------------------------------------------------------------------------
|
5
|
+
| Ship Helpers
|
6
|
+
|--------------------------------------------------------------------------
|
7
|
+
|
|
8
|
+
| Write only general helper functions here.
|
9
|
+
| Container specific helper functions should go into their own related Containers.
|
10
|
+
| All files under app/{section_name}/{container_name}/Helpers/ folder will be autoloaded by Apiato.
|
11
|
+
|
|
12
|
+
*/
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Kernels;
|
4
|
+
|
5
|
+
use Illuminate\Console\Scheduling\Schedule;
|
6
|
+
use Illuminate\Foundation\Console\Kernel as LaravelConsoleKernel;
|
7
|
+
|
8
|
+
class ConsoleKernel extends LaravelConsoleKernel
|
9
|
+
{
|
10
|
+
/**
|
11
|
+
* The Artisan commands provided by your application.
|
12
|
+
*
|
13
|
+
* @var array
|
14
|
+
*/
|
15
|
+
protected $commands = [
|
16
|
+
// NOTE: your Containers command will all be auto registered for you.
|
17
|
+
// Same for the Ship commands who live in the `app/Ship/Commands/` directory.
|
18
|
+
// If you have commands living somewhere else then consider registering them manually here.
|
19
|
+
];
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Define the application's command schedule.
|
23
|
+
*
|
24
|
+
* @param Schedule $schedule
|
25
|
+
* @return void
|
26
|
+
*/
|
27
|
+
protected function schedule(Schedule $schedule)
|
28
|
+
{
|
29
|
+
// $schedule->command('inspire')->hourly();
|
30
|
+
}
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Register the commands for the application.
|
34
|
+
*
|
35
|
+
* @return void
|
36
|
+
*/
|
37
|
+
protected function commands()
|
38
|
+
{
|
39
|
+
// NOTE: No need to load your Commands manually from here.
|
40
|
+
// As they are automatically registered by the Apiato Loader.
|
41
|
+
|
42
|
+
// $this->load(__DIR__.'/Commands');
|
43
|
+
|
44
|
+
require app_path('Ship/Commands/closures.php');
|
45
|
+
}
|
46
|
+
}
|
@@ -0,0 +1,113 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Kernels;
|
4
|
+
|
5
|
+
use Apiato\Core\Middlewares\Http\ProcessETagHeadersMiddleware;
|
6
|
+
use Apiato\Core\Middlewares\Http\ProfilerMiddleware;
|
7
|
+
use Apiato\Core\Middlewares\Http\ValidateJsonContent;
|
8
|
+
use App\Ship\Middlewares\Authenticate;
|
9
|
+
use App\Ship\Middlewares\EncryptCookies;
|
10
|
+
use App\Ship\Middlewares\PreventRequestsDuringMaintenance;
|
11
|
+
use App\Ship\Middlewares\TrimStrings;
|
12
|
+
use App\Ship\Middlewares\TrustProxies;
|
13
|
+
use App\Ship\Middlewares\VerifyCsrfToken;
|
14
|
+
use Illuminate\Auth\Middleware\Authorize;
|
15
|
+
use Illuminate\Auth\Middleware\EnsureEmailIsVerified;
|
16
|
+
use Illuminate\Auth\Middleware\RequirePassword;
|
17
|
+
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
18
|
+
use Illuminate\Foundation\Http\Kernel as LaravelHttpKernel;
|
19
|
+
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
|
20
|
+
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
|
21
|
+
use Illuminate\Http\Middleware\HandleCors;
|
22
|
+
use Illuminate\Http\Middleware\SetCacheHeaders;
|
23
|
+
use Illuminate\Routing\Middleware\SubstituteBindings;
|
24
|
+
use Illuminate\Routing\Middleware\ThrottleRequests;
|
25
|
+
use Illuminate\Routing\Middleware\ValidateSignature;
|
26
|
+
use Illuminate\Session\Middleware\AuthenticateSession;
|
27
|
+
use Illuminate\Session\Middleware\StartSession;
|
28
|
+
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
29
|
+
|
30
|
+
class HttpKernel extends LaravelHttpKernel
|
31
|
+
{
|
32
|
+
/**
|
33
|
+
* The application's global HTTP middleware stack.
|
34
|
+
*
|
35
|
+
* These middleware are run during every request to your application.
|
36
|
+
*
|
37
|
+
* @var array<int, class-string|string>
|
38
|
+
*/
|
39
|
+
protected $middleware = [
|
40
|
+
// Laravel middlewares
|
41
|
+
// \App\Http\Middleware\TrustHosts::class,
|
42
|
+
TrustProxies::class,
|
43
|
+
HandleCors::class,
|
44
|
+
PreventRequestsDuringMaintenance::class,
|
45
|
+
ValidatePostSize::class,
|
46
|
+
TrimStrings::class,
|
47
|
+
ConvertEmptyStringsToNull::class,
|
48
|
+
];
|
49
|
+
|
50
|
+
/**
|
51
|
+
* The application's route middleware groups.
|
52
|
+
*
|
53
|
+
* @var array<string, array<int, class-string|string>>
|
54
|
+
*/
|
55
|
+
protected $middlewareGroups = [
|
56
|
+
'web' => [
|
57
|
+
EncryptCookies::class,
|
58
|
+
AddQueuedCookiesToResponse::class,
|
59
|
+
StartSession::class,
|
60
|
+
ShareErrorsFromSession::class,
|
61
|
+
VerifyCsrfToken::class,
|
62
|
+
SubstituteBindings::class,
|
63
|
+
],
|
64
|
+
|
65
|
+
'api' => [
|
66
|
+
// Note: The "throttle" Middleware is registered by the RoutesLoaderTrait in the Core
|
67
|
+
// 'throttle:api',
|
68
|
+
SubstituteBindings::class,
|
69
|
+
ValidateJsonContent::class,
|
70
|
+
ProcessETagHeadersMiddleware::class,
|
71
|
+
ProfilerMiddleware::class,
|
72
|
+
],
|
73
|
+
];
|
74
|
+
|
75
|
+
/**
|
76
|
+
* The application's route middleware.
|
77
|
+
*
|
78
|
+
* These middleware may be assigned to groups or used individually.
|
79
|
+
*
|
80
|
+
* @var array<string, class-string|string>
|
81
|
+
*/
|
82
|
+
protected $routeMiddleware = [
|
83
|
+
'auth' => Authenticate::class,
|
84
|
+
// 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
85
|
+
'auth.session' => AuthenticateSession::class,
|
86
|
+
'cache.headers' => SetCacheHeaders::class,
|
87
|
+
'can' => Authorize::class,
|
88
|
+
// Note: The "guest" middleware is registered by MiddlewareServiceProvider in Authentication Container
|
89
|
+
// 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
90
|
+
'password.confirm' => RequirePassword::class,
|
91
|
+
'signed' => ValidateSignature::class,
|
92
|
+
'throttle' => ThrottleRequests::class,
|
93
|
+
'verified' => EnsureEmailIsVerified::class,
|
94
|
+
];
|
95
|
+
|
96
|
+
/**
|
97
|
+
* The priority-sorted list of middleware.
|
98
|
+
*
|
99
|
+
* Forces non-global middleware to always be in the given order.
|
100
|
+
*
|
101
|
+
* @var string[]
|
102
|
+
*/
|
103
|
+
protected $middlewarePriority = [
|
104
|
+
EncryptCookies::class,
|
105
|
+
StartSession::class,
|
106
|
+
ShareErrorsFromSession::class,
|
107
|
+
Authenticate::class,
|
108
|
+
ThrottleRequests::class,
|
109
|
+
AuthenticateSession::class,
|
110
|
+
SubstituteBindings::class,
|
111
|
+
Authorize::class,
|
112
|
+
];
|
113
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Middlewares;
|
4
|
+
|
5
|
+
use Apiato\Core\Middlewares\Http\Authenticate as CoreMiddleware;
|
6
|
+
use App\Ship\Providers\RouteServiceProvider;
|
7
|
+
|
8
|
+
class Authenticate extends CoreMiddleware
|
9
|
+
{
|
10
|
+
protected function redirectTo($request)
|
11
|
+
{
|
12
|
+
if (!$request->expectsJson()) {
|
13
|
+
return route(RouteServiceProvider::LOGIN);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Middlewares;
|
4
|
+
|
5
|
+
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
6
|
+
|
7
|
+
class EncryptCookies extends Middleware
|
8
|
+
{
|
9
|
+
/**
|
10
|
+
* The names of the cookies that should not be encrypted.
|
11
|
+
*
|
12
|
+
* @var array<int, string>
|
13
|
+
*/
|
14
|
+
protected $except = [
|
15
|
+
//
|
16
|
+
];
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Middlewares;
|
4
|
+
|
5
|
+
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
|
6
|
+
|
7
|
+
class PreventRequestsDuringMaintenance extends Middleware
|
8
|
+
{
|
9
|
+
/**
|
10
|
+
* The URIs that should be reachable while maintenance mode is enabled.
|
11
|
+
*
|
12
|
+
* @var array<int, string>
|
13
|
+
*/
|
14
|
+
protected $except = [
|
15
|
+
//
|
16
|
+
];
|
17
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Middlewares;
|
4
|
+
|
5
|
+
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
6
|
+
|
7
|
+
class TrimStrings extends Middleware
|
8
|
+
{
|
9
|
+
/**
|
10
|
+
* The names of the attributes that should not be trimmed.
|
11
|
+
*
|
12
|
+
* @var array<int, string>
|
13
|
+
*/
|
14
|
+
protected $except = [
|
15
|
+
'current_password',
|
16
|
+
'password',
|
17
|
+
'password_confirmation',
|
18
|
+
];
|
19
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Middlewares;
|
4
|
+
|
5
|
+
use Illuminate\Http\Middleware\TrustHosts as Middleware;
|
6
|
+
|
7
|
+
class TrustHosts extends Middleware
|
8
|
+
{
|
9
|
+
/**
|
10
|
+
* Get the host patterns that should be trusted.
|
11
|
+
*
|
12
|
+
* @return array<int, string|null>
|
13
|
+
*/
|
14
|
+
public function hosts()
|
15
|
+
{
|
16
|
+
return [
|
17
|
+
$this->allSubdomainsOfApplicationUrl(),
|
18
|
+
];
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Middlewares;
|
4
|
+
|
5
|
+
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
6
|
+
use Illuminate\Http\Request;
|
7
|
+
|
8
|
+
class TrustProxies extends Middleware
|
9
|
+
{
|
10
|
+
/**
|
11
|
+
* The trusted proxies for this application.
|
12
|
+
*
|
13
|
+
* @var array<int, string>|string|null
|
14
|
+
*/
|
15
|
+
protected $proxies;
|
16
|
+
|
17
|
+
/**
|
18
|
+
* The headers that should be used to detect proxies.
|
19
|
+
*
|
20
|
+
* @var int
|
21
|
+
*/
|
22
|
+
protected $headers =
|
23
|
+
Request::HEADER_X_FORWARDED_FOR |
|
24
|
+
Request::HEADER_X_FORWARDED_HOST |
|
25
|
+
Request::HEADER_X_FORWARDED_PORT |
|
26
|
+
Request::HEADER_X_FORWARDED_PROTO |
|
27
|
+
Request::HEADER_X_FORWARDED_AWS_ELB;
|
28
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Ship\Middlewares;
|
4
|
+
|
5
|
+
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
6
|
+
|
7
|
+
class VerifyCsrfToken extends Middleware
|
8
|
+
{
|
9
|
+
/**
|
10
|
+
* The URIs that should be excluded from CSRF verification.
|
11
|
+
*
|
12
|
+
* @var array<int, string>
|
13
|
+
*/
|
14
|
+
protected $except = [
|
15
|
+
//
|
16
|
+
];
|
17
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
use Illuminate\Database\Migrations\Migration;
|
4
|
+
use Illuminate\Database\Schema\Blueprint;
|
5
|
+
use Illuminate\Support\Facades\Schema;
|
6
|
+
|
7
|
+
return new class extends Migration
|
8
|
+
{
|
9
|
+
/**
|
10
|
+
* Run the migrations.
|
11
|
+
*
|
12
|
+
* @return void
|
13
|
+
*/
|
14
|
+
public function up(): void
|
15
|
+
{
|
16
|
+
Schema::create('notifications', function (Blueprint $table) {
|
17
|
+
$table->uuid('id')->primary();
|
18
|
+
$table->string('type');
|
19
|
+
$table->morphs('notifiable');
|
20
|
+
$table->text('data');
|
21
|
+
$table->timestamp('read_at')->nullable();
|
22
|
+
$table->timestamps();
|
23
|
+
});
|
24
|
+
}
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Reverse the migrations.
|
28
|
+
*
|
29
|
+
* @return void
|
30
|
+
*/
|
31
|
+
public function down(): void
|
32
|
+
{
|
33
|
+
Schema::dropIfExists('notifications');
|
34
|
+
}
|
35
|
+
};
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
use Illuminate\Database\Migrations\Migration;
|
4
|
+
use Illuminate\Database\Schema\Blueprint;
|
5
|
+
use Illuminate\Support\Facades\Schema;
|
6
|
+
|
7
|
+
return new class extends Migration
|
8
|
+
{
|
9
|
+
/**
|
10
|
+
* Run the migrations.
|
11
|
+
*
|
12
|
+
* @return void
|
13
|
+
*/
|
14
|
+
public function up()
|
15
|
+
{
|
16
|
+
Schema::create('failed_jobs', function (Blueprint $table) {
|
17
|
+
$table->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
|
+
};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
use Illuminate\Database\Migrations\Migration;
|
4
|
+
use Illuminate\Database\Schema\Blueprint;
|
5
|
+
use Illuminate\Support\Facades\Schema;
|
6
|
+
|
7
|
+
return new class extends Migration
|
8
|
+
{
|
9
|
+
/**
|
10
|
+
* Run the migrations.
|
11
|
+
*
|
12
|
+
* @return void
|
13
|
+
*/
|
14
|
+
public function up(): void
|
15
|
+
{
|
16
|
+
if (Config::get('queue.default') === 'database') {
|
17
|
+
Schema::create('jobs', function (Blueprint $table) {
|
18
|
+
$table->id();
|
19
|
+
$table->string('queue')->index();
|
20
|
+
$table->longText('payload');
|
21
|
+
$table->unsignedTinyInteger('attempts');
|
22
|
+
$table->unsignedInteger('reserved_at')->nullable();
|
23
|
+
$table->unsignedInteger('available_at');
|
24
|
+
$table->unsignedInteger('created_at');
|
25
|
+
$table->index(['queue', 'reserved_at']);
|
26
|
+
});
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Reverse the migrations.
|
32
|
+
*
|
33
|
+
* @return void
|
34
|
+
*/
|
35
|
+
public function down(): void
|
36
|
+
{
|
37
|
+
Schema::dropIfExists('jobs');
|
38
|
+
}
|
39
|
+
};
|
File without changes
|