PHP code example of users-au / users-au-laravel-client
1. Go to this page and download the library: Download users-au/users-au-laravel-client 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/ */
users-au / users-au-laravel-client example snippets
// In your routes/web.php
Route::middleware('auth')->group(function () {
Route::get('/dashboard', [DashboardController::class, 'index']);
Route::get('/profile', [ProfileController::class, 'show']);
});
// In a service provider
Event::listen(\Illuminate\Auth\Events\Login::class, function ($event) {
// Custom logic after user login
$user = $event->user;
// Log login activity
activity()
->performedOn($user)
->log('User logged in via Users.au');
});