Skip to content

Instantly share code, notes, and snippets.

@nullproduction
Created May 5, 2015 21:27
Show Gist options
  • Save nullproduction/6ab24952c5f765403780 to your computer and use it in GitHub Desktop.
Save nullproduction/6ab24952c5f765403780 to your computer and use it in GitHub Desktop.
Пример сервис-провайдера
<?php
namespace App\Libs\VK\Laravel;
use Illuminate\Support\ServiceProvider;
class VKServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->singleton('vk', function ($app) {
$config = $this->app->config->get('services.vk');
$vk = new \App\Libs\VK\VK($config);
return $vk;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment