app/Http/Controllers/OrdenController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $ordenes = Orden::join('mesas','ordenes.mesa_id','=','mesas.id')
        ->where('ordenes.tipo_orden','=','LOCAL')
              ->where('ordenes.estado_pago','=','SIN CANCELAR')
        ->select('ordenes.*','mesas.codigo_mesa')->get();
        return view('administracion.orden.index',compact('ordenes'));
    }
public function index ( ) { $ ordenes = Orden :: join ( 'mesas' , 'ordenes.mesa_id' , '=' , 'mesas.id' ) -> where ( 'ordenes.tipo_orden' , '=' , 'LOCAL' ) -> where ( 'ordenes.estado_pago' , '=' , 'SIN CANCELAR' ) -> select ( 'ordenes.*' , 'mesas.codigo_mesa' ) -> get ( ) ; return view ( 'administracion.orden.index' , compact ( 'ordenes' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .