Route works only with get
-
Hi, do you know why I can't fast with these routes and I only go when I get?
It should be mentioned that I do not have separate pages for them, but there is no separate page for delete either.
Is it because I gave findOrFail Id?
Can you give me some advice on what I could do?Repository public function showPriceWithoutFidelityGroup() { $user = auth()->guard('customer')->user(); if ( $user->customer_group_id == 6 || $user->customer_group_id == 7 || $user->customer->group_id == 8) { $user->customer_group_id = 1; $user->save(); } } public function showPriceWithFidelityGroup() { $user = auth()->guard('customer')->user(); if ( $user->money_spent >= 1000 && $user->money_spent < 5000 ) { $user->customer_group_id = 6; $user->save(); } else if ($user->money_spent >= 5000 && $user->money_spent < 15000 ) { $user->customer_group_id = 7; $user->save(); } else if ($user->money_spent >= 15000) { $user->customer_groupd_id = 8; $user->save(); } } Controller public function showPriceWithoutFidelityGroup() { $this->customerRepository->showPriceWithoutFidelityGroup(); return redirect()->back();; } public function showPriceWithFidelityGroup() { $this->customerRepository->showPriceWithFidelityGroup(); return redirect()->back(); } Routes Route::get('profile/setnofidelity', 'Webkul\Customer\Http\Controllers\CustomerController@showPriceWithoutFidelityGroup')->name('customer.profile.deletegroup'); Route::get('profile/setfidelity', 'Webkul\Customer\Http\Controllers\CustomerController@showPriceWithFidelityGroup')->name('customer.profile.setgroup');
And normally here you should update or post.
-
I am not getting this, you have registered your routes as GET so you are getting data only in GET.
What are you concerned about?