PHP code example of ageekdev / laravel-social-link-validator

1. Go to this page and download the library: Download ageekdev/laravel-social-link-validator 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/ */

    

ageekdev / laravel-social-link-validator example snippets


$validated = $request->validate([
    'link' => 'social_link'
]);

$validated = $request->validate([
    'facebook_link' => 'social_link:facebook'
]);

use AgeekDev\SocialLinkValidator\Facades\SocialLinkValidator;

$platform = SocialLinkValidator::guess($link);

use AgeekDev\SocialLinkValidator\Facades\SocialLinkValidator;

$platform = SocialLinkValidator::guess($url);

if ($platform) {
    $isValid = SocialLinkValidator::driver($platform)->isValid($url);
}