laravel-vk is a simple laravel 4 service provider (wrapper) for Vladkens/VK which provides VK API support in PHP 5.3+
Add laravel-vk to your composer.json file:
"require": {
"vk/laravel-vk": "dev-master"
}
Use composer to install this package.
$ composer update
Register the service provider within the providers
array found in app/config/app.php
:
'providers' => array(
// ...
'Alkali\VK\VKServiceProvider'
)
Add an alias within the aliases
array found in app/config/app.php
:
'aliases' => array(
// ...
'VK' => 'Alkali\VK\Facade\VK',
)
Create configuration file manually in config directory app/config/vk.php
and put there code from below.
return array(
'client_id' => '',
'client_secret' => '',
'scope' => array(),
);
$vk = VK::init($accessToken);