shell bypass 403

UnknownSec Shell


name : FloatingBarController.php
<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\FloatingBar;
use App\Models\Translation\FloatingBarTranslation;
use Illuminate\Http\Request;

class FloatingBarController extends Controller
{

    public function index(Request $request)
    {
        $this->authorize('admin_floating_bar_create');

        $floatingBar = FloatingBar::query()->first();

        $defaultLocal = getDefaultLocale();
        $locale = $request->get('locale', mb_strtolower($defaultLocal));

        if (!empty($floatingBar)) {
            storeContentLocale($locale, $floatingBar->getTable(), $floatingBar->id);
        }

        $definedLanguage = [];
        if (!empty($floatingBar) and $floatingBar->translations) {
            $definedLanguage = $floatingBar->translations->pluck('locale')->toArray();
        }

        $data = [
            'pageTitle' => trans('update.top_bottom_bar'),
            'floatingBar' => $floatingBar,
            'definedLanguage' => $definedLanguage,
        ];

        return view('admin.floating_bar.index', $data);
    }

    public function store(Request $request)
    {
        $this->authorize('admin_floating_bar_create');

        $data = $request->all();

        $startDate = !empty($data['start_at']) ? convertTimeToUTCzone($data['start_at'], getTimezone())->getTimestamp() : null;
        $endDate = !empty($data['end_at']) ? convertTimeToUTCzone($data['end_at'], getTimezone())->getTimestamp() : null;

        $insert = [
            'start_at' => $startDate,
            'end_at' => $endDate,
            'title_color' => $data['title_color'] ?? null,
            'description_color' => $data['description_color'] ?? null,
            'icon' => $data['icon'] ?? null,
            'background_color' => $data['background_color'] ?? null,
            'background_image' => $data['background_image'] ?? null,
            'btn_url' => $data['btn_url'] ?? null,
            'btn_color' => $data['btn_color'] ?? null,
            'btn_text_color' => $data['btn_text_color'] ?? null,
            'bar_height' => $data['bar_height'] ?? null,
            'position' => $data['position'],
            'fixed' => (!empty($data['fixed'])),
            'enable' => (!empty($data['enable'])),
        ];

        $floatingBar = FloatingBar::query()->first();

        if (!empty($floatingBar)) {
            $floatingBar->update($insert);
        } else {
            $floatingBar = FloatingBar::query()->create($insert);
        }

        FloatingBarTranslation::updateOrCreate([
            'floating_bar_id' => $floatingBar->id,
            'locale' => mb_strtolower($data['locale']),
        ], [
            'title' => $data['title'] ?? null,
            'description' => $data['description'] ?? null,
            'btn_text' => $data['btn_text'] ?? null,
        ]);

        $toastData = [
            'title' => trans('public.request_success'),
            'msg' => trans('update.floating_bar_successfully_updated'),
            'status' => 'success'
        ];

        if ($request->ajax()) {
            return response()->json([
                'code' => 200
            ]);
        }

        return redirect(getAdminPanelUrl("/floating_bars"))->with(['toast' => $toastData]);
    }
}

© 2025 UnknownSec
Courses | Anyleson - Learning Platform
INR (₹)
India Rupee
$
United States Dollar

Courses

17 Courses
Course
Full Stack Web Development

Full Stack Web Development

in Web Development
83:20 Hours
10 Oct 2024
₹28,318.82
Course
Installment and Secure Host

Installment and Secure Host

in Business Strategy
5.00
1:30 Hours
16 Mar 2023
₹118
Course
New Update Features

New Update Features

in Language
4.00
1:30 Hours
21 Jun 2022
Free
Not conducted
Bestseller
New In-App Live System

New In-App Live System

in Communications
5.00
2:30 Hours
1 Mar 2026
₹11.80
Featured
New Learning Page

New Learning Page

in Lifestyle
5.00
3:30 Hours
1 Mar 2022
Free
Finished
How to Travel Around the World

How to Travel Around the World

in Lifestyle
5.00
2:30 Hours
2 Mar 2022
₹29.50

Type

More options