PHP code example of manukn / oauth2-server-proxify-laravel

1. Go to this page and download the library: Download manukn/oauth2-server-proxify-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

manukn / oauth2-server-proxify-laravel example snippets


Route::any('proxify/{url?}', function ($url) {
  return Proxify::makeRequest(Request::method(), Request::all(), $url);
})->where('url', '(.*)');

/**
 * Use this method in the laravel route file
 * @param $method
 * @param array $inputs
 * @return Response
 * @throws ProxyMissingParamException
 */
Proxify::makeRequest(Request::method(), Input::all());

php artisan vendor:publish
app/config/proxy.php