app/Http/Controllers/PanaderiaController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $datospanaderia=request()->all();
        $datospanaderia=request()->except('_token');
        panaderia::insert($datospanaderia);
        return response()->json($datospanaderia);
        return redirect('panaderia')->with('Mensaje','Infomacion agregada con éxito');
    }
public function store ( Request $ request ) { $ datospanaderia = request ( ) -> except ( '_token' ) ; panaderia :: insert ( $ datospanaderia ) ; return redirect ( 'panaderia' ) -> with ( 'Mensaje' , 'Infomacion agregada con éxito') ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// // $datospanaderia=request()->all(); //return response()->json($datospanaderia);