1. Go to this page and download the library: Download kontenta/kontour 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/ */
kontenta / kontour example snippets
'guards' => [
//...
'admin' => [
'driver' => 'session',
'provider' => 'admins',
],
],
'providers' => [
//...
'admins' => [
'driver' => 'eloquent',
'model' => App\AdminUser::class, // Your admin user model
],
],
'passwords' => [
//...
'admins' => [
'provider' => 'admins',
'table' => 'password_resets', //using same table as the main user model
'expire' => 60,
],
],
'guard' => 'admin',
'passwords' => 'admins',
/* Use the name of your admin model, this examples uses the default App\User */
// List all users
App\User::all();
// Start building a new user object
$user = new App\User();
// Set fields
$user->name = 'Admin';
$user->email = '[email protected]';
// Set a password (remember to send it to the user):
$user->password = bcrypt(...);
// ...or have the user reset password before logging in (if you've added a password reset configuration):
$user->password = '';
// Then save the user!
$user->save();