Go and use this https://socialiteproviders.netlify.com/providers/line.html
- install socialiteproviders/manager
- Remove Laravel\Socialite\SocialiteServiceProvider from your providers[] array in config\app.php if you have added it already.
- Add \SocialiteProviders\Manager\ServiceProvider::class to your providers[] array in config\app.php.
- create LineExtendSocialite.php and Provider.php
- Add autoload to composer.json
- Add the Event and Listeners. like
protected $listen = [
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
'SocialiteProviders\Line\LineExtendSocialite@handle',
],
];
- Add config in config/services.php. like
'line' => [
'client_id' => env('LINE_CHANNEL_ID'),
'client_secret' => env('LINE_SECRET'),
'redirect' => env('LINE_REDIRECT_URI'),
],
create LineExtendSocialite.php and Provider.php ไปสร้างไว้ที่ไหนครับ