diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index e6f441d..c41c5c9 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":1,"defects":{"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testCreate":5,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testIndex":5,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testDestroy":5,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testFileUpload":8,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testCreateSubsciption":1,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testUpdatePaymentMethod":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingSubscribe":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingGetDetails":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingPaymentMethod":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingCoupon":1,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testTwoFactorEmail":8,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testGoogleTwoFactor":5,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testGetTwoFactorPage":5,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testVerifyTwoFactorEmail":7,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testCreate":7,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testIndex":5,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testDestroy":5,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testAuthenticatorTwoFactor":7,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testPostRegistration":7,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testVerifyRecovery":7,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testImageUpload":7,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testLeaveTeam":5,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testRemoveTeamMember":5,"Tests\\Feature\\Controllers\\TeamsControllerTest::testDelete":5,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testAccept":7,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testSecurity":8,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testUpdatePassword":7},"times":{"Tests\\Unit\\ActivityServiceTest::testLog":0.004,"Tests\\Unit\\InviteServiceTest::testCreate":0.014,"Tests\\Unit\\InviteServiceTest::testValidateInvitation":0.002,"Tests\\Unit\\TeamServiceTest::testCreate":0.001,"Tests\\Unit\\TeamServiceTest::testUpdate":0.002,"Tests\\Unit\\TeamServiceTest::testInvite":0.002,"Tests\\Unit\\TeamServiceTest::testLeaveTeam":0.003,"Tests\\Unit\\TeamServiceTest::testRemoveMember":0.004,"Tests\\Unit\\TeamServiceTest::testDeleteTeam":0.004,"Tests\\Feature\\Controllers\\Admin\\DashboardControllerTest::testIndex":0.072,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testIndex":0.035,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testCreate":0.034,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testStore":0.013,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testEdit":0.038,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testUpdate":0.005,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testDelete":0.005,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testIndex":0.036,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testSearch":0.035,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testGetInvite":0.032,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testPostInvite":0.09,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testEdit":0.036,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testUpdate":0.006,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testLoginAsUser":0.006,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testReturnToLoginFromUser":0.008,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testDelete":0.004,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testCreate":0.008,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testIndex":0.001,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testDestroy":0.001,"Tests\\Feature\\Controllers\\Ajax\\CookiePolicyControllerTest::testAccept":0.004,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testFileUpload":0.014,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testCreateSubsciption":0.003,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testUpdatePaymentMethod":0.001,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testMe":0.026,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testMeWithBearerToken":0.012,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testUpdate":0.007,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testDestroy":0.003,"Tests\\Feature\\Controllers\\Auth\\ConfirmsPasswordControllerTest::testGetConfirmPasswordPage":0.029,"Tests\\Feature\\Controllers\\Auth\\ForgotPasswordControllerTest::testGetForgotPassword":0.014,"Tests\\Feature\\Controllers\\Auth\\LoginControllerTest::testGetLoginPage":0.018,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testGetRegistration":0.016,"Tests\\Feature\\Controllers\\Auth\\ResetPasswordControllerTest::testGetResetPasswordPage":0.013,"Tests\\Feature\\Controllers\\Auth\\VerificationControllerTest::testGetVerificationPage":0.003,"Tests\\Feature\\Controllers\\DashboardControllerTest::testDashboard":0.036,"Tests\\Feature\\Controllers\\InvitesControllerTest::testResend":0.007,"Tests\\Feature\\Controllers\\InvitesControllerTest::testRevoke":0.005,"Tests\\Feature\\Controllers\\PagesControllerTest::testHome":0.016,"Tests\\Feature\\Controllers\\PagesControllerTest::testSupport":0.028,"Tests\\Feature\\Controllers\\PagesControllerTest::testPrivacyPolicy":0.027,"Tests\\Feature\\Controllers\\PagesControllerTest::testTermsOfService":0.025,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testShow":0.038,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testEditMember":0.035,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testUpdateMember":0.009,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testInviteMember":0.007,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testLeaveTeam":0.006,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testRemoveTeamMember":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testIndex":0.03,"Tests\\Feature\\Controllers\\TeamsControllerTest::testIndexWithSubcription":0.03,"Tests\\Feature\\Controllers\\TeamsControllerTest::testCreate":0.031,"Tests\\Feature\\Controllers\\TeamsControllerTest::testStore":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testEdit":0.04,"Tests\\Feature\\Controllers\\TeamsControllerTest::testUpdate":0.007,"Tests\\Feature\\Controllers\\TeamsControllerTest::testDelete":0.008,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingSubscribe":0.002,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingGetDetails":0.001,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingPaymentMethod":0.001,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingCoupon":0.001,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testSecurity":0.036,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testUpdatePassword":0.097,"Tests\\Feature\\Controllers\\User\\DestroyControllerTest::testDestroy":0.028,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testIndex":0.028,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testAccept":0.006,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testReject":0.028,"Tests\\Feature\\Controllers\\User\\LogoutSessionsControllerTest::testSessionLogout":0.007,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testIndex":0.029,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testMarkAsRead":0.005,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testDelete":0.004,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testDeleteAll":0.005,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testSettings":0.033,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testUpdateSettings":0.005,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testUpdateUserAvatar":0.006,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testTwoFactorEmail":0.005,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testGoogleTwoFactor":0,"Tests\\Feature\\Helpers\\ActivityHelperTest::testActivityLog":0.001,"Tests\\Feature\\Helpers\\NotificationHelperTest::testAppNotify":0,"Tests\\Feature\\Helpers\\NotificationHelperTest::testEmailNotifyDisabled":0.001,"Tests\\Feature\\Helpers\\NotificationHelperTest::testPusherGeneral":0.002,"Tests\\Feature\\Helpers\\NotificationHelperTest::testPusherUser":0.001,"Tests\\Feature\\Resources\\UserResourceTest::testUserResource":0,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testGetTwoFactorPage":0.021,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testVerifyTwoFactorEmail":0.005,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testGetRecoveryPage":0.017,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testCreate":0.005,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testIndex":0.04,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testDestroy":0.008,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testAuthenticatorTwoFactor":0.005,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testPostRegistration":0.01,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testVerifyRecovery":0.015,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testImageUpload":0.004}} \ No newline at end of file +{"version":1,"defects":{"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testCreate":5,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testIndex":5,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testDestroy":5,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testFileUpload":8,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testCreateSubsciption":1,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testUpdatePaymentMethod":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingSubscribe":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingGetDetails":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingPaymentMethod":1,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingCoupon":1,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testTwoFactorEmail":8,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testGoogleTwoFactor":5,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testGetTwoFactorPage":5,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testVerifyTwoFactorEmail":7,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testCreate":7,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testIndex":5,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testDestroy":5,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testAuthenticatorTwoFactor":7,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testPostRegistration":7,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testVerifyRecovery":7,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testImageUpload":7,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testLeaveTeam":5,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testRemoveTeamMember":5,"Tests\\Feature\\Controllers\\TeamsControllerTest::testDelete":5,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testAccept":7,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testSecurity":8,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testUpdatePassword":7},"times":{"Tests\\Unit\\ActivityServiceTest::testLog":0.007,"Tests\\Unit\\InviteServiceTest::testCreate":0.014,"Tests\\Unit\\InviteServiceTest::testValidateInvitation":0.002,"Tests\\Unit\\TeamServiceTest::testCreate":0.001,"Tests\\Unit\\TeamServiceTest::testUpdate":0.001,"Tests\\Unit\\TeamServiceTest::testInvite":0.004,"Tests\\Unit\\TeamServiceTest::testLeaveTeam":0.004,"Tests\\Unit\\TeamServiceTest::testRemoveMember":0.004,"Tests\\Unit\\TeamServiceTest::testDeleteTeam":0.005,"Tests\\Feature\\Controllers\\Admin\\DashboardControllerTest::testIndex":0.071,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testIndex":0.034,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testCreate":0.036,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testStore":0.009,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testEdit":0.035,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testUpdate":0.005,"Tests\\Feature\\Controllers\\Admin\\RoleControllerTest::testDelete":0.005,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testIndex":0.048,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testSearch":0.035,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testGetInvite":0.031,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testPostInvite":0.097,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testEdit":0.035,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testUpdate":0.006,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testLoginAsUser":0.007,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testReturnToLoginFromUser":0.009,"Tests\\Feature\\Controllers\\Admin\\UserControllerTest::testDelete":0.005,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testCreate":0.008,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testIndex":0.001,"Tests\\Feature\\Controllers\\Ajax\\ApiTokenControllerTest::testDestroy":0.001,"Tests\\Feature\\Controllers\\Ajax\\CookiePolicyControllerTest::testAccept":0.003,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testFileUpload":0.016,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testCreateSubsciption":0.003,"Tests\\Feature\\Controllers\\Ajax\\SubscriptionControllerTest::testUpdatePaymentMethod":0.001,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testMe":0.025,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testMeWithBearerToken":0.009,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testUpdate":0.007,"Tests\\Feature\\Controllers\\Api\\UsersControllerTest::testDestroy":0.004,"Tests\\Feature\\Controllers\\Auth\\ConfirmsPasswordControllerTest::testGetConfirmPasswordPage":0.03,"Tests\\Feature\\Controllers\\Auth\\ForgotPasswordControllerTest::testGetForgotPassword":0.015,"Tests\\Feature\\Controllers\\Auth\\LoginControllerTest::testGetLoginPage":0.018,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testGetRegistration":0.016,"Tests\\Feature\\Controllers\\Auth\\ResetPasswordControllerTest::testGetResetPasswordPage":0.013,"Tests\\Feature\\Controllers\\Auth\\VerificationControllerTest::testGetVerificationPage":0.003,"Tests\\Feature\\Controllers\\DashboardControllerTest::testDashboard":0.036,"Tests\\Feature\\Controllers\\InvitesControllerTest::testResend":0.007,"Tests\\Feature\\Controllers\\InvitesControllerTest::testRevoke":0.004,"Tests\\Feature\\Controllers\\PagesControllerTest::testHome":0.016,"Tests\\Feature\\Controllers\\PagesControllerTest::testSupport":0.028,"Tests\\Feature\\Controllers\\PagesControllerTest::testPrivacyPolicy":0.025,"Tests\\Feature\\Controllers\\PagesControllerTest::testTermsOfService":0.025,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testShow":0.035,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testEditMember":0.034,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testUpdateMember":0.009,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testInviteMember":0.006,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testLeaveTeam":0.005,"Tests\\Feature\\Controllers\\TeamMembersControllerTest::testRemoveTeamMember":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testIndex":0.027,"Tests\\Feature\\Controllers\\TeamsControllerTest::testIndexWithSubcription":0.028,"Tests\\Feature\\Controllers\\TeamsControllerTest::testCreate":0.03,"Tests\\Feature\\Controllers\\TeamsControllerTest::testStore":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testEdit":0.034,"Tests\\Feature\\Controllers\\TeamsControllerTest::testUpdate":0.006,"Tests\\Feature\\Controllers\\TeamsControllerTest::testDelete":0.007,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingSubscribe":0.003,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingGetDetails":0.001,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingPaymentMethod":0.001,"Tests\\Feature\\Controllers\\User\\BillingControllerTest::testBillingCoupon":0.001,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testSecurity":0.036,"Tests\\Feature\\Controllers\\User\\ChangePasswordControllerTest::testUpdatePassword":0.186,"Tests\\Feature\\Controllers\\User\\DestroyControllerTest::testDestroy":0.027,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testIndex":0.028,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testAccept":0.006,"Tests\\Feature\\Controllers\\User\\InvitesControllerTest::testReject":0.027,"Tests\\Feature\\Controllers\\User\\LogoutSessionsControllerTest::testSessionLogout":0.006,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testIndex":0.029,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testMarkAsRead":0.006,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testDelete":0.004,"Tests\\Feature\\Controllers\\User\\NotificationControllerTest::testDeleteAll":0.005,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testSettings":0.034,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testUpdateSettings":0.006,"Tests\\Feature\\Controllers\\User\\SettingsControllerTest::testUpdateUserAvatar":0.006,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testTwoFactorEmail":0.006,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testGoogleTwoFactor":0,"Tests\\Feature\\Helpers\\ActivityHelperTest::testActivityLog":0.001,"Tests\\Feature\\Helpers\\NotificationHelperTest::testAppNotify":0,"Tests\\Feature\\Helpers\\NotificationHelperTest::testEmailNotifyDisabled":0.002,"Tests\\Feature\\Helpers\\NotificationHelperTest::testPusherGeneral":0.003,"Tests\\Feature\\Helpers\\NotificationHelperTest::testPusherUser":0.001,"Tests\\Feature\\Resources\\UserResourceTest::testUserResource":0,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testGetTwoFactorPage":0.021,"Tests\\Feature\\Controllers\\Auth\\TwoFactorControllerTest::testVerifyTwoFactorEmail":0.005,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testGetRecoveryPage":0.017,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testCreate":0.005,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testIndex":0.041,"Tests\\Feature\\Controllers\\User\\ApiTokenControllerTest::testDestroy":0.009,"Tests\\Feature\\Controllers\\User\\UserTwoFactorTest::testAuthenticatorTwoFactor":0.005,"Tests\\Feature\\Controllers\\Auth\\RegistrationControllerTest::testPostRegistration":0.01,"Tests\\Feature\\Controllers\\Auth\\RecoveryControllerTest::testVerifyRecovery":0.016,"Tests\\Feature\\Controllers\\Ajax\\FileUploadControllerTest::testImageUpload":0.004}} \ No newline at end of file diff --git a/app/Http/Controllers/Api/ApiController.php b/app/Http/Controllers/Api/ApiController.php index 8ff6fde..2eb83cd 100644 --- a/app/Http/Controllers/Api/ApiController.php +++ b/app/Http/Controllers/Api/ApiController.php @@ -6,14 +6,14 @@ class ApiController extends Controller { - public $user; - - public function __construct() + public function user() { - $this->user = auth('sanctum')->user(); + $user = auth('sanctum')->user(); - if (is_null($this->user) && ! app()->runningInConsole()) { + if (is_null($user) && ! app()->runningInConsole()) { abort(401, 'Unauthorized.'); } + + return $user; } } diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 18565a7..9090f93 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -18,7 +18,7 @@ class UsersController extends ApiController public function me() { return response()->json([ - 'data' => new UserResource($this->user), + 'data' => new UserResource($this->user()), ]); } @@ -30,13 +30,13 @@ public function me() public function update(ApiUserUpdateRequest $request) { if ( - $this->user->update([ + $this->user()->update([ 'email' => $request->json('email'), 'name' => $request->json('name'), ]) ) { return response()->json([ - 'data' => new UserResource($this->user), + 'data' => new UserResource($this->user()), 'status' => 'Profile updated', ]); } @@ -53,17 +53,17 @@ public function update(ApiUserUpdateRequest $request) */ public function destroy() { - if ($this->user->avatar) { - Storage::delete($this->user->avatar); + if ($this->user()->avatar) { + Storage::delete($this->user()->avatar); } $subject = 'Account Deletion.'; $message = 'Your account has been deleted.'; - Notification::route('mail', $this->user->email) - ->notify(new StandardEmail($this->user->name, $subject, $message)); + Notification::route('mail', $this->user()->email) + ->notify(new StandardEmail($this->user()->name, $subject, $message)); - $this->user->delete(); + $this->user()->delete(); return response()->json([ 'status' => 'Profile deleted', diff --git a/app/View/Forms/AdminUserForm.php b/app/View/Forms/AdminUserForm.php index d4822ac..df2211d 100644 --- a/app/View/Forms/AdminUserForm.php +++ b/app/View/Forms/AdminUserForm.php @@ -6,7 +6,6 @@ use App\Models\User; use Grafite\Forms\Fields\Bootstrap\HasOne; use Grafite\Forms\Fields\Email; -use Grafite\Forms\Fields\Hidden; use Grafite\Forms\Fields\Text; use Grafite\Forms\Forms\ModelForm; @@ -55,9 +54,6 @@ public function fields() 'sortable' => true, 'table_class' => 'd-none d-sm-table-cell', ]), - Hidden::make('role', [ - 'table_class' => 'd-none d-sm-table-cell', - ]), HasOne::make('role', [ 'required' => true, 'visible' => false, diff --git a/resources/views/admin/users/index.blade.php b/resources/views/admin/users/index.blade.php index 08ab808..ae50c8b 100755 --- a/resources/views/admin/users/index.blade.php +++ b/resources/views/admin/users/index.blade.php @@ -50,7 +50,7 @@

User Invites

-
+
@foreach($invites as $invite)