PHP Classes

File: src/Providers/HeroQRServiceProvider.php

Recommend this page to a friend!
  Packages of Amirreza Ebrahimi   HeroQR Powerful PHP QR Code Library to generate PNG, SVG, PDF, Logos Ready to Use with Laravel   src/Providers/HeroQRServiceProvider.php   Download  
File: src/Providers/HeroQRServiceProvider.php
Role: Class source
Content type: text/plain
Description: Class source
Class: HeroQR Powerful PHP QR Code Library to generate PNG, SVG, PDF, Logos Ready to Use with Laravel
Generate QR code images in several formats
Author: By
Last change: feat: add SVG customization support for shapes, markers, and cursors (previously only PNG)
Date: 27 days ago
Size: 832 bytes
 

Contents

Class file image Download
<?php

namespace HeroQR\Providers;

use
HeroQR\Core\QRCodeGenerator;
use
Illuminate\Support\ServiceProvider;

/**
 * Registers and bootstraps the QR code generation services for HeroQR package in Laravel
 */
class HeroQRServiceProvider extends ServiceProvider
{
   
/**
     * Bootstrap any application services
     *
     * @return void
     */
   
public function boot()
    {
       
// Load routes, config, or other resources here if needed
        // e.g. $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
   
}

   
/**
     * Register any application services
     *
     * @return void
     */
   
public function register()
    {
       
// Register the QRCodeGenerator as a singleton
       
$this->app->singleton(QRCodeGenerator::class, function ($app) {
            return new
QRCodeGenerator();
        });
    }
}