PHP code example of foxbyte / smart-link

1. Go to this page and download the library: Download foxbyte/smart-link library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

foxbyte / smart-link example snippets


use SmartLink\SmartLink;

// Set the package name and desktop URL (optional if set globally)
SmartLink::setPackageName('com.yourcompany.yourapp');
SmartLink::setDesktopURL('https://example.com/desktop-landing-page');

// Generate a smart link for mobile or desktop
$payload = ['referral_code' => 'ABC123'];
$smartLink = SmartLink::generateSmartLink($payload);

// Use the generated smart link in your application
echo $smartLink;
bash
php artisan vendor:publish --tag=config --provider="SmartLink\SmartLinkServiceProvider"