PHP code example of jawabapp / community

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

    

jawabapp / community example snippets


USE Jawabapp\Community\Contracts\CommunityAccount;
use Jawabapp\Community\Traits\HasCommunityAccount;

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


use Illuminate\Database\Eloquent\Builder;

class User extends Authenticatable implements CommunityAccount
{
    public static function getLoggedInUser()
    {
        //...
    }
    public function getAccount($account_id)
    {
        //...
    }
}


php artisan vendor:publish --provider=Jawabapp\Community\CommunityServiceProvider


[
    'user_class' => \App\User::class, // user class
    'route' => [
        'prefix' => 'package', // route prefix
        'middleware' => 'web', // route middlware
    ]
,
	//...
]