ldc-legaulois/app/Http/Controllers/DansLesPresController.php
Vincent BRIDIER 1faa324639 Dans les pres
2022-08-17 11:19:21 +00:00

36 lines
1 KiB
PHP

<?php
namespace App\Http\Controllers;
use App\Enums\DansLesPresType;
use App\Models\DansLesPresContent;
class DansLesPresController extends Controller
{
/**
* Show danslespres description content
*
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
*/
public function description()
{
$danslespresContents = DansLesPresContent::where('type', DansLesPresType::description())
->where('status', true)
->orderBy('order')
->get();
return view('front.danslespres.description', compact('danslespresContents'));
}
/**
* Show danslespres media content
*
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
*/
public function media()
{
$danslespresContents = DansLesPresContent::where('type', DansLesPresType::media())
->orderBy('order')
->where('status', true)->get();
return view('front.danslespres.media', compact('danslespresContents'));
}
}