jawabapp/community


README

Installation

You can install the package via composer:

composer require jawabapp/community

Usage

User.php Model
USE Jawabapp\Community\Contracts\CommunityAccount;
use Jawabapp\Community\Traits\HasCommunityAccount;

class User extends Authenticatable implements CommunityAccount
{
	use HasCommunityAccount;
	//...
}

implement those methods from CommunityAccount interface.

use Illuminate\Database\Eloquent\Builder;

class User extends Authenticatable implements CommunityAccount
{
    public static function getLoggedInUser()
    {
        //...
    }
    public function getAccount($account_id)
    {
        //...
    }
}
Publish Package assets
Run follwoing command on Terminal
php artisan vendor:publish --provider=Jawabapp\Community\CommunityServiceProvider
alter community.php config file adding user class and route prefix
[
    'user_class' => \App\User::class, // user class
    'route' => [
        'prefix' => 'package', // route prefix
        'middleware' => 'web', // route middlware
    ]
,
	//...
]

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email trmdy@hotmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.