Пример #1
0
 /**
  * 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();
 }
Пример #2
0
 /**
  * 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');
 }
Пример #3
0
 /**
  * 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');
 }
Пример #4
0
 /**
  * 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!');
 }