This commit is contained in:
sayaliparab
2024-07-03 16:24:22 +05:30
parent cf45241300
commit dd5cb06b4c
8 changed files with 369 additions and 68 deletions

View File

@@ -6,6 +6,8 @@ use App\Http\Controllers\Controller;
use App\Services\APIs\CustomerAPIs\RulesApiServices;
use Illuminate\Support\Facades\Log;
use Illuminate\Http\Request;
use App\Models\Faq;
class SubscriptionController extends Controller
{
@@ -14,19 +16,20 @@ class SubscriptionController extends Controller
//created by; Hritik
//On - 28th June ,2024
//use - to get Data of User in Webview and show list of product
public function mySubscription(Request $request)
{
try {
{
try {
$faqs = Faq::with('faqCategory')->where('faq_category_id', 3)->get();
return view('Admin.pages.subscriptions.my-subscription', compact('faqs'));
return view('Admin.pages.subscriptions.my-subscription');
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
//created by; Hritik
@@ -37,11 +40,10 @@ class SubscriptionController extends Controller
public function listOfProduct(Request $request)
{
try {
return view('Admin.pages.subscriptions.list-of-products');
$faqs = Faq::with('faqCategory')->where('faq_category_id', 3)->get();
return view('Admin.pages.subscriptions.list-of-products', compact('faqs'));
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);