PHP code example of ehesp / steam-login

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

    

ehesp / steam-login example snippets



// app/config/app.php
'providers' => array(
	'...',
	'Ehesp\SteamLogin\Laravel\SteamLoginServiceProvider',
),


// app/config/app.php
'aliases' => array(
	'...',
	'SteamLogin' => 'Ehesp\SteamLogin\Laravel\Facades\SteamLogin',
),


// login.php
use Ehesp\SteamLogin\SteamLogin;

$login = new SteamLogin();
echo $login->url();


// index.php
use Ehesp\SteamLogin\SteamLogin;

$login = new SteamLogin();
echo $login->validate();


// view.blade.php
<a href="{{ SteamLogin::url() }}">Login via Steam!</a>


// app/filters.php 
App::before(function($request)
{
	View::share('url', SteamLogin::url());
});

// view.php
<a href="$url">Login via Steam!</a>


// app/routes.php
Route::get('/', function()
{
	return SteamLogin::validate();
});


$login->url('http://mywebsite.com/login');


// app/config/steam.php
return array (
	'login' => 'http://mywebsite.com/login',
	// 'login' => URL::to('login'),
);


SteamLogin::url(Config::get('steam.login'));
// SteamLogin::url(URL::to('login'));