1. Go to this page and download the library: Download launcher/mercurius 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/ */
return [
/*
|--------------------------------------------------------------------------
| Mercurius Models
|--------------------------------------------------------------------------
|
| Defines the models used with Mercurius, use it to extend Mercurius and
| create your own implementation.
|
*/
'models' => [
'user' => App\User::class,
'messages' => Launcher\Mercurius\Models\Message::class,
],
/*
|--------------------------------------------------------------------------
| User Table Fields
|--------------------------------------------------------------------------
|
| You can specify the column names for the user table. The `name` accepts
| an array of fields, for building custom names with multiple columns.
|
*/
'fields' => [
// 'name' => ['first_name', 'last_name'],
'name' => 'name',
'slug' => 'slug',
'avatar' => 'avatar',
],
];
// ...
use Illuminate\Foundation\Auth\User as Authenticatable;
use Launcher\Mercurius\MercuriusUser;
class User extends Authenticatable
{
use MercuriusUser;
// ...
}