forked from eatvio/eatvio-infra
42 lines
935 B
PHP
Executable File
42 lines
935 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Diary;
|
|
use Illuminate\View\View;
|
|
|
|
class ConsultantDiaryCommentController extends Controller
|
|
{
|
|
public function show(Diary $diary): View
|
|
{
|
|
$data = [
|
|
'daysCount' => 1,
|
|
'diary' => $diary,
|
|
];
|
|
|
|
return view('diary.consultant_comments', $data);
|
|
}
|
|
|
|
public function edit(Diary $diary): View
|
|
{
|
|
$curMeals = $diary->meals()->orderBy('type')->get();
|
|
$typeNames = [
|
|
__('diary.breakfast'),
|
|
__('diary.dinner'),
|
|
__('diary.supper'),
|
|
__('diary.lunch'),
|
|
__('diary.snacks'),
|
|
];
|
|
|
|
$data = [
|
|
'daysCount' => 1,
|
|
'diary' => $diary,
|
|
'curDiary' => $diary,
|
|
'curMeals' => $curMeals,
|
|
'typeNames' => $typeNames,
|
|
];
|
|
|
|
return view('diary.consultant_comments_edit', $data);
|
|
}
|
|
}
|