/**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(GenreRequest $request)
 {
     if ($request->ajax()) {
         Distrito::create($request->all());
         return response()->json(["mensaje" => "criado"]);
     }
 }
Example #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit()
 {
     $distritos = Distrito::lists('distrito', 'id');
     return view('bairro.edit', ['bairro' => $this->bairro, 'distritos' => $distritos]);
 }
Example #3
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $distritos = Distrito::lists('distrito', 'id');
     $bairros = Bairro::lists('bairro', 'id');
     return view('cliente.create', compact('distritos', 'bairros'));
 }