This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models\Traits; | |
use Illuminate\Support\Facades\DB; | |
/** | |
* This trait keeps functionality to read & write hierarchical data from & into a closure table. | |
* IMPORTANT: In your model please set the variable $closure_table, e.g. | |
* protected $closure_table = 'destinations_tree'; |