Skip to content

Commit d78a652

Browse files
authored
pull the user from the $request (#10169)
the `$user` variable does not exist. we need to retrieve the user via `$request->user()`
1 parent 83b872e commit d78a652

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cashier-paddle.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,8 @@ Once you are ready to create an actual subscription for the user, you may use th
11471147
use Illuminate\Http\Request;
11481148

11491149
Route::get('/user/subscribe', function (Request $request) {
1150-
$checkout = $user->subscribe('pri_monthly')
1150+
$checkout = $request->user()
1151+
->subscribe('pri_monthly')
11511152
->returnTo(route('home'));
11521153

11531154
return view('billing', ['checkout' => $checkout]);

0 commit comments

Comments
 (0)