forked from eatvio/eatvio-infra
consultant comments edit added
This commit is contained in:
106
app/Http/Controllers/ConsultantDiaryCommentController.php
Normal file
106
app/Http/Controllers/ConsultantDiaryCommentController.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\ConsultantDiaryComment;
|
||||
use App\Models\Diary;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ConsultantDiaryCommentController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\Models\Diary $diary
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(Diary $diary)
|
||||
{
|
||||
$data = [
|
||||
'daysCount' => 1,
|
||||
'diary' => $diary,
|
||||
];
|
||||
return view('diary.consultant_comments', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\Models\Diary $diary
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(Diary $diary)
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Models\Diary $diary
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, Diary $diary)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\Models\Diary $consultantDiaryComment
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Diary $diary)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user