Example #1
0
 public function polling()
 {
     $this->data['polling'] = Models\Polling::with('jawaban')->where('status', 'Y')->first();
     $this->data['total_data'] = $this->data['polling']->jawaban->sum('counter') / 100;
     return view('front.lihatpoll', $this->data);
 }
Example #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $polling = Polling::find($id);
     if ($polling->delete()) {
         return response()->json(array('success' => TRUE));
     }
 }