Actualizacuion de Rama Kquiroz

This commit is contained in:
ellecio2
2023-09-04 19:53:37 -04:00
parent d2e9ba53ab
commit 2e99d7b290
2206 changed files with 100145 additions and 467275 deletions

View File

@@ -5,7 +5,10 @@ namespace App\Http\Controllers\Seller;
use App\Models\BusinessSetting;
use Illuminate\Http\Request;
use App\Models\Shop;
use App\Models\User;
use App\Notifications\ShopVerificationNotification;
use Auth;
use Illuminate\Support\Facades\Notification;
class ShopController extends Controller
{
@@ -51,9 +54,9 @@ class ShopController extends Controller
$shop->youtube = $request->youtube;
} elseif (
$request->has('top_banner') ||
$request->has('sliders') ||
$request->has('banner_full_width_1') ||
$request->has('banners_half_width') ||
$request->has('sliders') ||
$request->has('banner_full_width_1') ||
$request->has('banners_half_width') ||
$request->has('banner_full_width_2')
) {
$shop->top_banner = $request->top_banner;
@@ -72,7 +75,7 @@ class ShopController extends Controller
return back();
}
public function verify_form ()
public function verify_form()
{
if (Auth::user()->shop->verification_info == null) {
$shop = Auth::user()->shop;
@@ -112,6 +115,9 @@ class ShopController extends Controller
$shop = Auth::user()->shop;
$shop->verification_info = json_encode($data);
if ($shop->save()) {
$users = User::findMany([auth()->user()->id, User::where('user_type', 'admin')->first()->id]);
Notification::send($users, new ShopVerificationNotification($shop));
flash(translate('Your shop verification request has been submitted successfully!'))->success();
return redirect()->route('seller.dashboard');
}