PHP code example of laraveladmin / hyperf-nestedset
1. Go to this page and download the library: Download laraveladmin/hyperf-nestedset 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/ */
laraveladmin / hyperf-nestedset example snippets
class Categories extends Model
{
use \Lostinfo\Nestedset\NodeTrait;
public function saving(Saving $event)
{
return self::onSaving($this);
}
public function deleted(Deleted $event)
{
self::onDeleted($this);
}
public function restoring(Restoring $event)
{
self::onRestoring($this);
}
public function restored(Restored $event)
{
self::onRestored($this);
}
}