public function storefromajax()
 {
     $fpls = new FPLSpec();
     $fpls->details = Input::get('details');
     $fpls->save();
     return Response::json($fpls);
 }
 public function destroy($id)
 {
     FPL::where('id', '=', $id)->delete();
     MengetahuiFPL::where('fpl_id', '=', $id)->delete();
     FPLSpec::where('fpl_id', '=', $id)->delete();
     FPLKebutuhan::where('fpl_id', '=', $id)->delete();
     FPLPembelian::where('fpl_id', '=', $id)->delete();
     FPLPerbaikan::where('fpl_id', '=', $id)->delete();
     Session::flash('success', 'Data telah dihapus.');
     return Redirect::to('/admin/fpl');
 }