shell bypass 403

UnknownSec Shell


name : FavoriteController.php
<?php

namespace App\Http\Controllers\Panel;

use App\Http\Controllers\Controller;
use App\Models\Favorite;

class favoriteController extends Controller
{
    public function index()
    {
        $user = auth()->user();

        $favorites = Favorite::where('user_id', $user->id)
            ->with(['webinar' => function ($query) {
                $query->with(['teacher' => function ($qu) {
                    $qu->select('id', 'full_name');
                }, 'category']);
            }])
            ->orderBy('created_at','desc')
            ->paginate(10);

        $data = [
            'pageTitle' => trans('panel.favorites'),
            'favorites' => $favorites
        ];

        return view(getTemplate() . '.panel.webinar.favorites', $data);
    }

    public function destroy($id)
    {
        $user = auth()->user();

        $favorite = favorite::where('id', $id)
            ->where('user_id', $user->id)
            ->first();

        if (!empty($favorite)) {
            $favorite->delete();

            return response()->json([
                'code' => 200
            ], 200);
        }

        return response()->json([], 422);
    }
}

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

Courses

17 Courses
Course
Web Design for Beginners

Web Design for Beginners

in Design
4.25
1:45 Hours
8 Jul 2021
₹11.80
40% Offer
The Future of Energy

The Future of Energy

in Science
2.50
1:10 Hours
8 Jul 2021
₹42.48 ₹70.80
20% Offer
Health And Fitness Masterclass

Health And Fitness Masterclass

in Health & Fitness
5.00
1:00 Hours
1 Jul 2021
₹18.88 ₹23.60
20% Offer
Learn and Understand AngularJS

Learn and Understand AngularJS

in Web Development
2.75
1:00 Hours
10 Dec 2023
₹18.88 ₹23.60
Finished
Effective Time Management

Effective Time Management

in Management
5.00
1:30 Hours
1 Aug 2023
₹35.40

Type

More options