PHP code example of makkinga / laravel-trusted-devices
1. Go to this page and download the library: Download makkinga/laravel-trusted-devices 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/ */
makkinga / laravel-trusted-devices example snippets
return [
# Overwrite the auto detection of the guard
'guard' => null,
# The layout to use for the views
'layout' => 'layouts.app',
# The middleware to use for the routes
'middleware' => ['web', 'auth'],
# Automatically trust the first device
'trust_first_device' => true
];
use Illuminate\Notifications\Notifiable;
use Makkinga\TrustedDevices\Traits\HasTrustedDevices;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable, HasTrustedDevices;
}