app/Http/Controllers/OrdenController.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)
    {
        $orden = new Orden();
        $orden->codigo_seguimiento = substr(microtime(),11,strlen(microtime())-11);
        $orden->estado_servicio = $request->estado_servicio;
        $orden->estado_servicio="PENDIENTE";
        $orden->estado_pago="SIN CANCELAR";
        $orden->tipo_orden="LOCAL";
        $orden->mesa_id = $request->mesa_id;
        $orden->user_id=auth()->user()->id;
        $orden->save();
        return redirect()->action('OrdenController@agregarDetalle',['id' =>$orden->id]);
    }
public function store ( Request $ request ) { $ orden = new Orden ( ) ; $ orden -> codigo_seguimiento = substr ( microtime ( ) , 11 , strlen ( microtime ( ) ) - 11 ) ; $ orden -> estado_servicio = $ request -> estado_servicio ; $ orden -> estado_servicio = " PENDIENTE " ; $ orden -> estado_pago = " SIN CANCELAR " ; $ orden -> tipo_orden = " LOCAL " ; $ orden -> mesa_id = $ request -> mesa_id ; $ orden -> user_id = auth ( ) -> user ( ) -> id ; $ orden -> save ( ) ; return redirect ( ) -> action ( 'OrdenController@agregarDetalle' , [ 'id' => $ orden -> id ] ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .