Пример #1
0
 public function qr($size)
 {
     if (!$this->qr_code) {
         $this->qr_code = md5(md5($this->id) . "!@#\$.Oiad12Adkfjas2@\$55");
         $this->save();
     }
     $qr = $this->getPath("c", "qr." . $size);
     if (!file_exists($qr)) {
         QrCode::format('png')->size($size)->generate($this->qr_code, $qr);
     }
     return $qr;
 }
Пример #2
0
 public function qrcode(Request $request)
 {
     $order = ActivityOrder::findOrfail($request->input('orderId'));
     $result = $this->initPayOrder($order);
     if ($this->isResultOK($result)) {
         $order->paying = 1;
         $order->save();
         $url = $result["code_url"];
         return QrCode::format('png')->size(200)->generate($url);
     } else {
         return readfile('img/qrcode-failed.png');
     }
 }
Пример #3
0
function generateQRCode($thc)
{
    $path = base_path('public') . DIRECTORY_SEPARATOR . 'customers' . DIRECTORY_SEPARATOR . 'qrcodes' . DIRECTORY_SEPARATOR . $thc . '.png';
    $code = \SimpleSoftwareIO\QrCode\Facades\QrCode::format('png')->size(150)->generate($thc, $path);
    return $code;
}
Пример #4
0
                <th>ID</th>
                <th>Name</th>
                <th>Model</th>
                <th>Plate No</th>
                <th>Chases No</th>
                <th>No of Sitter</th>
                <th>Bus Color</th>
                <th ></th>
                <th ></th>
            </tr>
            </tfoot>
        </table>


        <?php 
echo \SimpleSoftwareIO\QrCode\Facades\QrCode::size(100)->generate("Amedora33") . "<br>";
?>
        <?php 
$uuid1 = Ramsey\Uuid\Uuid::uuid5(Ramsey\Uuid\Uuid::NAMESPACE_DNS, 'Amedora33');
echo $uuid1->toString() . "<br>";
?>
        <?php 
echo strtoupper(uniqid()) . "<br>";
?>
        <?php 
printf("uniqid('php_'): %s\r\n", uniqid('php_'));
?>
    </div><!-- /.box-body -->
</div><!-- /.box -->