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,
]);
}
}