Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minhazulmin/laravel-11-qr-code-generate
Laravel-11-QR-Code-Generate is a versatile Laravel package that simplifies the generation of QR codes in Laravel 11 applications. With an easy-to-use interface and robust features, it empowers developers to seamlessly integrate QR code functionality, For Sponsor WhatsApp me +8801751337061.
https://github.com/minhazulmin/laravel-11-qr-code-generate
laravel laravel-framework laravel-qr-code-generator laravel-qr-generation laravel10 laravel11 qr-code-generator qrcode qrcode-scanner
Last synced: 23 days ago
JSON representation
Laravel-11-QR-Code-Generate is a versatile Laravel package that simplifies the generation of QR codes in Laravel 11 applications. With an easy-to-use interface and robust features, it empowers developers to seamlessly integrate QR code functionality, For Sponsor WhatsApp me +8801751337061.
- Host: GitHub
- URL: https://github.com/minhazulmin/laravel-11-qr-code-generate
- Owner: Minhazulmin
- License: mit
- Created: 2023-10-27T17:29:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-28T04:06:40.000Z (23 days ago)
- Last Synced: 2024-12-28T05:17:56.236Z (23 days ago)
- Topics: laravel, laravel-framework, laravel-qr-code-generator, laravel-qr-generation, laravel10, laravel11, qr-code-generator, qrcode, qrcode-scanner
- Language: PHP
- Homepage:
- Size: 99.6 KB
- Stars: 27
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# QR Code Generator in Laravel 11
![Sponsor](https://i.postimg.cc/QdPWVf9Y/Screenshot-1.png)
**For Sponsor WhatsApp me +8801751337061**
Watch video on YouTube: https://www.youtube.com/minit61
Watch video on Facebook: https://www.facebook.com/minit61I will give you a very simple example of generating QR code with image, QR code with color, QR code with SMS, QR code with email, and QR code in Laravel 11
## Output
![App Screenshot](https://i.postimg.cc/9MQBzGCg/qr-code-generator.png)## Installation
**[Step - 1]** **Create new Project:**
(Open PowerShell In Your Local Machine and put this command)
```bash
Laravel new laravel10-qrcode-generator
```
**[Step - 2]** **Install package:**
```bash
composer require simplesoftwareio/simple-qrcode
```
**[Step - 3]** **Remove unnecessary code from inital Project:**
**[Step - 4]** **Make a controller:**
```bash
php artisan make:controller QRcodeGenerateController
```
**[Step - 5]** **Make a Route on the web.php:**
```bash
Route::get('/', [QRcodeGenerateController::class,'qrcode']);
```
**[Step - 6]** **Make Function with name in controller:**
```bash
public function qrcode()
```
**[Step - 7]** **Copy Code and paste on function:**Use it on the top of the controller
```bash
use SimpleSoftwareIO\QrCode\Facades\QrCode;
```
```bash
$qrCodes = [];
$qrCodes['simple'] =
QrCode::size(150)->generate('https://minhazulmin.github.io/');
$qrCodes['changeColor'] =
QrCode::size(150)->color(255, 0, 0)->generate('https://minhazulmin.github.io/');
$qrCodes['changeBgColor'] =
QrCode::size(150)->backgroundColor(255, 0, 0)->generate('https://minhazulmin.github.io/');
$qrCodes['styleDot'] =
QrCode::size(150)->style('dot')->generate('https://minhazulmin.github.io/');
$qrCodes['styleSquare'] = QrCode::size(150)->style('square')->generate('https://minhazulmin.github.io/');
$qrCodes['styleRound'] = QrCode::size(150)->style('round')->generate('https://minhazulmin.github.io/');return view('qrcode',$qrCodes);
```
**[Step - 8]** **Make a blade file:qrcode.blade.php**
**[Step - 9]** **Add Bootstrap cdn**
```bash
==> css
==> js```
**[Step - 10]** **Copy Code and paste on qrcode.blade.php file**
```bash
Color Change
{!! $changeColor !!}
Background Color Change
{!! $changeBgColor !!}
Style Square
{!! $styleSquare !!}
Style Dot
{!! $styleDot !!}
Style Round
{!! $styleRound !!}
```
**[Step - 11]** **Copy Code and paste on the bottom of the qrcode.blade.php**
```bash
function downloadSVG() {
const svg = document.getElementById('container').innerHTML;
const blob = new Blob([svg.toString()]);
const element = document.createElement("a");
element.download = "w3c.svg";
element.href = window.URL.createObjectURL(blob);
element.click();
element.remove();
}
```
**[Step - 12]** **run the command on the project terminal**
```bash
php artisan serve
```
Hit the url
```bash
http://127.0.0.1:8000/
```
## Authors- [@minhazulmin](https://www.github.com/minhazulmin)