1. Go to this page and download the library: Download stauth/laravel-stauth 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/ */
stauth / laravel-stauth example snippets
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Stauth\StauthServiceProvider;
class StauthProtectionServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
if ($this->app->environment('local', 'staging')) {
$this->app->register(StauthServiceProvider::class);
}
}
}