In this step, install the socialite package using the below command: composer require laravel/socialite Then add database details as follow: DB_CONNECTION=mysqlĭB_PASSWORD=here database password here Step 3: Download Socialite Package In this step, Go to project root directory and open the. Then configure this package in the app.php file. 'Socialite' => Laravel\Socialite\Facades\Socialite::class, Laravel\Socialite\SocialiteServiceProvider::class, Then add the following code into the app.php file: 'providers' => [ So go to the config directory and app.php. Now, click this link => and create a new Twitter app. When click the above link, the following page will see. Now fill out the form shown in the below picture. In this step, Go to app/Model/User.php and set fillable property put the below code here : 'datetime', 'redirect' => ' ], Step 5: Add Code In Model and Migration Where can get client id and secret for laravel Twitter login app:Īfter successfully creating an app in Twitter and getting credentials from Twitter dashboard, Set client id and client secret config/service.php file : 'twitter' => [ And submit it:Īfter successfully creating the twitter app. $table->timestamp('email_verified_at')->nullable() Next step, Go to app/database/create_users_table.php and put the below code here : * The accessors to append to the model's array form. In this step, we need to routes in the web.php file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |