Skip to content

Commit 282bf76

Browse files
committed
Fix missing controller error
1 parent 7bf2731 commit 282bf76

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.0.1 (2023-06-28)
4+
5+
- [fix] Missing controller error when submitting forms
6+
37
## 2.0.0 (2023-05-02)
48

59
- [new] Statamic 4 support

routes/web.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use JackSleight\StatamicMemberbox\Http\Controllers\UsersController;
4+
35
Route::name('statamic-memberbox.')->group(function () {
46
if (config('statamic.memberbox.enable_account', true)) {
57
if ($route = config('statamic.memberbox.routes.activate')) {
@@ -16,7 +18,7 @@
1618

1719
if ($route = config('statamic.memberbox.routes.profile')) {
1820
Route::statamic($route, 'statamic-memberbox::web.profile')->name('profile');
19-
Route::post('/!/statamic-memberbox/profile', 'UsersController@profile')->name('profile.action');
21+
Route::post('/!/statamic-memberbox/profile', [UsersController::class, 'profile'])->name('profile.action');
2022
}
2123

2224
if ($route = config('statamic.memberbox.routes.forgot_password')) {
@@ -29,15 +31,15 @@
2931

3032
if ($route = config('statamic.memberbox.routes.change_password')) {
3133
Route::statamic($route, 'statamic-memberbox::web.change_password')->name('change_password');
32-
Route::post('/!/statamic-memberbox/change_password', 'UsersController@changePassword')->name('change_password.action');
34+
Route::post('/!/statamic-memberbox/change_password', [UsersController::class, 'changePassword'])->name('change_password.action');
3335
}
3436
} else {
3537
if (config('statamic.memberbox.routes.profile')) {
36-
Route::post('/!/statamic-memberbox/profile', 'UsersController@profile')->name('profile.action');
38+
Route::post('/!/statamic-memberbox/profile', [UsersController::class, 'profile'])->name('profile.action');
3739
}
3840

3941
if (config('statamic.memberbox.routes.change_password')) {
40-
Route::post('/!/statamic-memberbox/change_password', 'UsersController@changePassword')->name('change_password.action');
42+
Route::post('/!/statamic-memberbox/change_password', [UsersController::class, 'changePassword'])->name('change_password.action');
4143
}
4244
}
4345
if (config('statamic.memberbox.enable_directory', false)) {

0 commit comments

Comments
 (0)