/**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $a = AllocatiePivot::findOrFail($id);
     if (!$a->validate(Input::all())) {
         return redirect('allocatie/' . $a->lnkAllocatieId . '/edit')->withErrors($a->errors())->withInput();
     }
     $a->fill(Input::all());
     $a->save();
     Flash::success('Allocatie is updated');
     return Redirect::to('allocatie/' . $a->lnkAllocatieId);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $a = AllocatiePivot::findOrFail($id);
     $a->delete();
     Flash::success('Allocatie is deleted');
     return Redirect::to('allocatie');
 }