PHP code example of lartie / attach-social-account
1. Go to this page and download the library: Download lartie/attach-social-account 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/ */
use LArtie\AttachSocialAccount\Core\Traits\HasSocialAccount;
use LArtie\AttachSocialAccount\Core\Contracts\HasSocialAccount as HasSocialAccountContract;
class User extends Authenticatable implements HasSocialAccountContract
{
use HasSocialAccount;
$user = User::first();
$vkData = [
'token' => 'token',
'uid' => 'user_id',
'nickname' => 'username',
'name' => 'first name and last name',
'email' => '[email protected]',
'avatar' => 'link_to',
];