1. Go to this page and download the library: Download baril/bonsai 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/ */
baril / bonsai example snippets
class Tag extends \Illuminate\Database\Eloquent\Model
{
use \Baril\Bonsai\Concerns\BelongsToTree;
protected $parentForeignKey = 'parent_tag';
protected $closureTable = 'tag_closures';
}