app/Http/Controllers/DoacoesController.php
/**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
Store a newly created resource in storage.
@return Response
Store a newly created resource in storage . @return Response
public function store(Request $request)
 {
   $doacao= new \App\Doacao;
   $doacao->tipoDoador=$request->get('tipoDoador');
   $doacao->tipoDoacao=$request->get('tipoDoacao');
   $doacao->quantidade=$request->get('quantity');
   $doacao->descricao=$request->get('descricao');
   $doacao->save();
      return redirect('doacoes')->with('success', 'Information has been added');
 }
public function store ( Request $ request ) { $ doacao = new \ App \ Doacao ; $ doacao -> tipoDoador = $ request -> get ( 'tipoDoador' ) ; $ doacao -> tipoDoacao = $ request -> get ( 'tipoDoacao' ) ; $ doacao -> quantidade = $ request -> get ( 'quantity' ) ; $ doacao -> descricao = $ request -> get ( 'descricao' ) ; $ doacao -> save ( ) ; return redirect ( 'doacoes' ) -> with ( 'success' , 'Information has been added' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .