PATH:
home
/
rwabteecom
/
project_11
/
app
/
Http
/
Controllers
/
Dashboard
/
Qrdesign
/
Editing: QrdesignController.php
<?php namespace App\Http\Controllers\Dashboard\Qrdesign; use App\Http\Controllers\Controller; use App\Models\User; use App\Services\Domain\DomainServices; use Illuminate\Http\Request; use Exception; use Log; use Auth; use Illuminate\Validation\Rule; class QrdesignController extends Controller { public function __construct( private readonly DomainServices $domainServices, ) { } public function index() { return view('dashboard.pages.qr-design')->with([ 'domain' => Auth::user()->domain, ]); } public function updateQR(Request $request) { try { $domain = auth()->user()->domain; $qr = $this->domainServices->updateQR($domain, $request); } catch (Exception $exception) { Log::error($exception->getMessage()); return $this->sendFailedResponse($exception->getMessage()); } return $this->sendSuccessResponse($qr); } public function getQR() { try { $domain = auth()->user()->domain; $qr = $this->domainServices->getQR($domain); } catch (Exception $exception) { Log::error($exception->getMessage()); return $this->sendFailedResponse($exception->getMessage()); } return $this->sendSuccessResponse($qr); } }
SAVE
CANCEL