/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(TypeRequest $request, Type $type) { $type->create($request->all()); flash('Type has been added'); return Redirect::back(); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(TypeRequest $request, $id) { $type = Type::findOrFail($id); $type->update($request->all()); return Redirect::to('tipos'); }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update(AdType $type, Requests\TypeRequest $request) { $type->update($request->input()); \Session::flash('message', 'Тип обьявления обновлен'); return redirect()->route('admin.type.index'); }
/** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return Response */ public function update(TypeRequest $request, $id) { $type = Type::findOrFail($id); $type->update($request->all()); return redirect('type')->with('message', 'Data berhasil dirubah!'); }