PHP code example of bap / connect

1. Go to this page and download the library: Download bap/connect 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/ */

    

bap / connect example snippets


...
use Bap\ConnectPlatform\Traits\WithDevices;
use Bap\ConnectPlatform\Contracts\WithDevicesInterface;

class User extends Model implements AuthenticatableContract,
                                    AuthorizableContract,
                                    CanResetPasswordContract,
                                    WithDevicesInterface
{
    use Authenticatable,
        Authorizable,
        CanResetPassword,
        RelationDevices;

    public function __constructor()
    {
        $this->middleware('jwt.auth');
    }

    Route::post('me', ['before' => 'jwt-auth', function() {
        // Todo
    }]);


use ConnectPlatform;
   
ConnectPlatform::profile(array $attributes);


app('platform')->profile(array $attribuites);

ConnectPlatform::getFriends($uid);

ConnectPlatform::getBlockFriends($uid);

ConnectPlatform::getListIdFriendWaiting($uid);

ConnectPlatform::getListIdFriendRequest($uid);

ConnectPlatform::getRelation($uid, $friendUID)

ConnectPlatform::isFriends($uid, array $uids)

ConnectPlatform::checkListFriends($uid, array $uids)

ConnectPlatform::sendFriendRequest($uid, $friendUid);

ConnectPlatform::approveFriendRequest($uid, $friendUid);

ConnectPlatform::searchTelephone($uid, array $params);

ConnectPlatform::getCoin($uid);

ConnectPlatform::getHistoryCoin($uid, $action);

ConnectPlatform::exchange($uid, $action, array $params);

ConnectPlatform::requestCoin($uid, $coin);

ConnectPlatform::withDrawMoney($uid, $money);

ConnectPlatform::getPaymentToken($uid);

ConnectPlatform::requestPayment($uid, array $params);

    php artisan vendor:publish --provider="Bap\ConnectPlatform\ConnectPlatformServiceProvide"


    php artisan migrate