Fixed TourBearbeiten, fixed Cancelled Checkbox in tour.show and tour.edit
This commit is contained in:
parent
bb640eb7a5
commit
9526e2f744
3 changed files with 20 additions and 7 deletions
|
|
@ -151,6 +151,7 @@ class TourController extends Controller
|
|||
*/
|
||||
public function update(Request $request, Tour $tour)
|
||||
{
|
||||
|
||||
error_log("Tour:update");
|
||||
$tour=Tour::find($request->input('tour_id'));
|
||||
|
||||
|
|
@ -185,14 +186,17 @@ class TourController extends Controller
|
|||
}
|
||||
|
||||
$tour->name=$request->input('name');
|
||||
if ($request->beschreibung) $request->input('beschreibung');
|
||||
if ($request->beschreibung) $tour->beschreibung=$request->input('beschreibung');
|
||||
if ($request->start) $tour->start=$request->input('start');
|
||||
if ($request->deadline) $tour->deadline=$request->input('deadline');
|
||||
if ($request->max_participants) $tour->max_participants=$request->input('max_participants');
|
||||
if ($request->is_cancelled) $tour->is_cancelled=$request->input('is_cancelled',false);
|
||||
$tour->is_cancelled= ($request->has('is_cancelled'));
|
||||
if ($request->bericht) $tour->bericht=$request->bericht;
|
||||
$tour->save();
|
||||
|
||||
|
||||
error_log("Is cancelled:". $tour->is_cancelled);
|
||||
|
||||
return redirect('/tour');
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue