HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/ipsremont-demo/app/Http/Controllers/HtmlController.php
<?php

namespace App\Http\Controllers;

use App\Models\Part;
use App\Repository\Part\PartRepository;
use Illuminate\Support\Facades\App;

class HtmlController extends Controller
{
    /** @var string */
    protected string $permission = '';

    public function index () {
        $routes = [
            route('html.index') => __('Сategoies'),
            route('html.show', 'devicelist') => __('Devicelist'),
            route('html.show', 'device') => __('Device'),
            route('html.show', 'order') => __('Order'),
        ];

        if (App::environment('local')) {
            $routes[route('html.show', 'email')] = __('Email');
            $routes[route('html.show', 'emailevents')] = __('Emailevents');
        }

        return view('html.index', compact('routes'));
    }

    public function show($layout) {
        $products = [
            [
                'image' => 'https://ipsremont.ru/wa-data/public/shop/products/03/00/3/images/6/6.745.jpg',
                'name' => 'Бензиновый триммер DZ - 260, объём двиг. 25,4см3. Прямая штанга (диск+катушка с леской) DENZEL'
            ],
            [
                'image' => 'https://ipsremont.ru/wa-data/public/shop/products/35/00/35/images/99/99.745.jpg',
                'name' => 'Газонокосилка электрическая 1400 Вт, 360 мм, 5 режимов высоты DENZEL'
            ],
            [
                'image' => 'https://ipsremont.ru/wa-data/public/shop/products/38/03/338/images/795/795.745.jpeg',
                'name' => 'Моечная машина высокого давления HPС-1600, 1600 Вт, 125 бар, 5,5 л/мин, колесная DENZEL'
            ],
            [
                'image' => 'https://ipsremont.ru/wa-data/public/shop/products/79/23/32379/images/13598/13598.970.jpg',
                'name' => 'Дренажный насос для грязной воды СДН450-35, 450 Вт, напор 5,5 м, 8000 л/ч Сибртех'
            ],
            [
                'image' => 'https://ipsremont.ru/wa-data/public/shop/products/24/03/324/images/779/779.745.jpg',
                'name' => 'Лебедка автомобильная электрическая LB- 3000, 3,6 т, 3,4 кВт, 12 В DENZEL'
            ],
            [
                'image' => 'https://ipsremont.ru/wa-data/public/shop/products/27/04/427/images/965/965.745.jpg',
                'name' => 'Тельфер электрический TF-1200, 1.2 т, 1800 Вт, высота 12 м, 8 м/мин // DENZEL'
            ],
        ];

        $product = $products[rand(0,5)];

        $variables = compact('products', 'product');

        if ($layout == 'device') {
            $data = PartRepository::getAvailable()->limit(rand(5,10))->get();
            $columns = Part::columns();

            $variables += compact('data', 'columns');
        }


        return view('html.'.$layout, $variables);
    }
}