Category Laravel
Create Auth URL
Go to the config/database.php update
1 2 |
'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', |
Install and Configure Laravel with Passport
First we install and configure laravel app with passport then next we install the open api l5 swagger for api documentations.
Step 1: Install Laravel App
First create a new Laravel application using the following mentioned command.
1 |
composer create-project --prefer-dist laravel/laravel blog |
Step your database credentials in your env file.
1 2 3 4 5 6 |
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel9 DB_USERNAME=root DB_PASSW... |
1 2 3 4 5 6 7 |
You'll need to use DB::raw(), perhaps something like Invite::where(DB::raw('BINARY `token`'), $token)->first(); or alternatively: Invite::whereRaw("BINARY `token`= ?",[$token])->first(); |
Use this link https://www.dropbox.com/developers/documentation/http/documentation for documentation
Create a function for Curl call
Use this link https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth?view=odsp-graph-online for documentation
creating a function for curl call
Install Google APIs Client Library for PHP
for more info check https://github.com/googleapis/google-api-php-client
1 |
composer require google/apiclient:"^2.0" |
Authentication
- Download this file: http://curl.haxx.se/ca/cacert.pem
- Place this file in the
C:\wamp64\bin\php\php7.1.9
folder - Open
php.ini
and find this line:
;curl.cainfo
Change it to:
curl.cainfo = "C:\wamp64\bin\php\php7.1.9\cacert.pem"
Make sure you remove the semicolon at the beginning of the line.
Save changes to php.ini
, restart WampServer, and you’re good to go!