PHP code example of sebastiaanluca / laravel-helpers
1. Go to this page and download the library: Download sebastiaanluca/laravel-helpers 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/ */
sebastiaanluca / laravel-helpers example snippets
locale();
// "en"
// When not authenticated
is_guest();
// true
// When authenticated as a user
is_guest();
// false
// When not authenticated
is_logged_in();
// false
// When authenticated as a user
is_logged_in();
// true
// When not authenticated
user();
// null
// When authenticated as a user
user();
// Illuminate\Foundation\Auth\User {}
// When not authenticated
me();
// null
// When authenticated as a user
me();
// Illuminate\Foundation\Auth\User {}