<?php

namespace Modules\Package\Controllers\Web;

/** Ajax Request */

use App\Http\Controllers\Controller;
use Modules\Package\Services\PackageService;

class PackageContoller extends Controller
{
    /** View folder */
    private $viewDirectory = 'web.pages.packages.';

    public function __construct(
        private PackageService $packageService,
    ){}

    public function show($id)
    {
        $package = $this->packageService->getItem($id);
        if (!$package)
        {
            return abort(404);
        }
        $title= __('web.package_details');
        $packages = $this->packageService->get([
            'not_id'=>$id
        ]);

        return view($this->viewDirectory.'show', get_defined_vars());
    }
}
