1. Go to this page and download the library: Download esatic/user-portal 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/ */
esatic / user-portal example snippets
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Routing\Router;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
/** @var Router $router */
$router = $this->app['router'];
$router->pushMiddlewareToGroup('user-crm', 'auth:api');//Your user middleware
$router->pushMiddlewareToGroup('administrator-crm','auth:admin'); //Your admin middleware
}
}
namespace App\Models;
use Laravel\Passport\HasApiTokens;
class Administrator extends \Esatic\ActiveUser\Models\Administrator
{
use HasApiTokens;
}