LaravelPackages.net
Acme Inc.
Toggle sidebar
oguzcandemircan/laravel-guest

:description

21
0
v0.2.0
About oguzcandemircan/laravel-guest

oguzcandemircan/laravel-guest is a Laravel package for :description. It currently has 0 GitHub stars and 21 downloads on Packagist (latest version v0.2.0). Install it with composer require oguzcandemircan/laravel-guest. Discover more Laravel packages by oguzcandemircan or browse all Laravel packages to compare alternatives.

Last updated

Laravel Guest

Latest Version on Packagist Total Downloads

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Via Composer

$ composer require oguzcandemircan/laravel-guest

Usage

Your models should use the LaravelGuestTrait trait.

use OguzcanDemircan\LaravelGuest\LaravelGuestTrait;

class User extends Authenticatable
{
  use LaravelGuestTrait
}

Via helper functions

user()->isGuest();

Via facades

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

Via Laravel resolve helper function

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

Service Container

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

Helper Functions

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

user_id()
#..

Available Methods

| Resource | Method | Type | |---|---|---| | OguzcanDemircan\LaravelGuest\LaravelGuest | isGuest | Boolean | | OguzcanDemircan\LaravelGuest\LaravelGuest | isMember | Boolean | | OguzcanDemircan\LaravelGuest\Helpers\Functions.php | is_guest() | Boolean | | OguzcanDemircan\LaravelGuest\Helpers\Functions.php | is_member() | Boolean | | OguzcanDemircan\LaravelGuest\Helpers\Functions.php | user_id() | Integer |

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ vendor/bin/phpunit test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

Star History Chart