PHP code example of oguzcandemircan / laravel-guest

1. Go to this page and download the library: Download oguzcandemircan/laravel-guest 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/ */

    

oguzcandemircan / laravel-guest example snippets


use OguzcanDemircan\LaravelGuest\LaravelGuestTrait;

class User extends Authenticatable
{
  use LaravelGuestTrait
}

user()->isGuest();

$user = LaravelGuest::make();
$user->isGuest();


$user = resolve('laravelguest')->make();
$user->isMember();   

$user = $this->app->resolving('laravelguest')->make();
$user->name;

if(is_member()) {
 #...
}
if(is_guest()) { 
#...
}

user_id()
#..