PHP code example of urb / xenforobridge

1. Go to this page and download the library: Download urb/xenforobridge 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/ */

    

urb / xenforobridge example snippets


'providers' => array(
		'Urb\XenforoBridge\XenforoBridgeServiceProvider::class',
)


return array(
		'xenforo_directory_path' => '/var/www/html/public/forums',
		'xenforo_base_url_path'  => '//example.com/forums/', //Default '/'
	);

protected $routeMiddleware = [
		'xen.auth' => 'Urb\XenforoBridge\Middleware\XenAuthMiddleware',
		'xen.auth.admin' => 'Urb\XenforoBridge\Middleware\XenAuthAdminMiddleware',
	];


Route::get('/example', ['middleware' => 'xen.auth',function(){
	//Do stuff
}]);

class SampleController extends Controller {


    function __construct()
    {

        $this->middleware('xen.auth');
    }

}


php artisan vendor:publish