boyjarv
1 week ago

Adding a function to a route

Posted 1 week ago by boyjarv

hi,

I would like to add a function to a route:

this is what I currently have:

Route::get('qr-code-g', function () {
    \QrCode::size(500)
        ->format('png')
        ->generate('ItSolutionStuff.com', public_path('images/qrcode.png'));

    return view('qrCode');

});

I would just like to use the function part:

function () {
    \QrCode::size(500)
        ->format('png')
        ->generate('ItSolutionStuff.com', public_path('images/qrcode.png'));

in this route:

Route::get('/venues/{town}/pdfs', '[email protected]')->name('venues.pdf');

Please help?

Please sign in or create an account to participate in this conversation.