<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Qrimages extends CI_Controller {

	public function __construct()
    {
       parent::__construct();
        if (!isset($_SESSION['qurbani_user_id'])) {
            redirect('/admin','refresh');
        }


		  $this->load->helper('url');
    }
	
public function QRcode($invoice_id)
{
    $this->load->library('ciqrcode');

    $invoice_link = base_url("admin/invoice/bill_print_view/{$invoice_id}");

    QRcode::png(
        $invoice_link,
        $outfile = false,
        $level = QR_ECLEVEL_H,
        $size = 5,
        $margin = 2
    );
}
}
