HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/slenders/slenders.nl/app/Komma/MonthlyMustHaves/MonthlyMustHaveController.php
<?php

namespace App\Komma\MonthlyMustHaves;

use App\Komma\Base\Controller;
use App\Komma\Components\ComponentService;
use App\Komma\MonthlyMustHaves\Models\MonthlyMustHave;
use App\Komma\Posts\Models\Post;

final class MonthlyMustHaveController extends Controller
{
    private $mmhService;

    public function __construct(MonthlyMustHaveService $mmhService)
    {
        parent::__construct();
        $this->mmhService = $mmhService;
    }

    /**
     * @param MonthlyMustHave $mmh
     * @return \Illuminate\Contracts\View\View
     */
    public function show(MonthlyMustHave $mmh)
    {
        $mmh->load('translation','images');

        $componentService = app(ComponentService::class);
        $components = $componentService->getViewComponents($mmh->translation);

        // Return view
        return view('site.templates.mmh_show',[
            'mmh' => $mmh,
            'components' => $components,
            'links' => $this->links,
        ]);
    }

}