PHP code example of rwandabuild / murugo_api_auth
1. Go to this page and download the library: Download rwandabuild/murugo_api_auth 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/ */
rwandabuild / murugo_api_auth example snippets
php artisan migrate
$user = User::find(2);
// refreshing murugo user token
$murugoUser = MurugoAuth::refreshToken($user->murugoUser);
json
php artisan vendor:publish
json
$murugoUser = MurugoAuth::user();
// accessing the related user
$user = $murugoUser->user;