1. Go to this page and download the library: Download hypefactors/laravel-follow 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/ */
hypefactors / laravel-follow example snippets
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Hypefactors\Laravel\Follow\Traits\CanFollow;
use Hypefactors\Laravel\Follow\Contracts\CanFollowContract;
class User extends Model implements CanFollowContract
{
use CanFollow;
}
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Hypefactors\Laravel\Follow\Traits\CanBeFollowed;
use Hypefactors\Laravel\Follow\Contracts\CanBeFollowedContract;
class Company extends Model implements CanBeFollowedContract
{
use CanBeFollowed;
}