gsdw / social by giangsoda

Laravel social connect
11
0
2
Package Data
Maintainer Username: giangsoda
Maintainer Contact: gsd@gmail.com (Giang Soda)
Package Create Date: 2016-05-06
Package Last Update: 2016-05-11
Language: PHP
License: MIT
Last Refreshed: 2024-04-23 03:03:25
Package Statistics
Total Downloads: 11
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel Gsdw Social

Introduction

install

add code to composer.json

"require": {
    "laravel/socialite": "^2.0",
    "gsdw/social": "0.1.*"
}

Configuration

register the Provider in your config/app.php configuration file:

'providers' => [
    // Other service providers...
    Laravel\Socialite\SocialiteServiceProvider::class,
    Gsdw\Social\Providers\SocialServiceProvider::class,
],

Also, add the Socialite facade to the aliases array in your app configuration file:

'Socialite' => Laravel\Socialite\Facades\Socialite::class,

Add information app project in config/services.php configuration file

'google' => [
    'client_id' => 'your-github-app-id',
    'client_secret' => 'your-github-app-secret',
    'redirect' => url('social/handle/google'),
],

Add link Login

Default link to login social is /social/redirect/google. Can use html output link: \Gsdw\Social\Helpers\Output::googleButton()

Notification

Add code in layout to show notification @if (count($errors) > 0) <ul> @foreach ($errors->all() as $error) <li>{{ $error }}</li> @endforeach </ul> @endif

Reference

https://github.com/laravel/socialite