src/Gzero/EloquentTree/Model/Tree.php
public static function getLeaves()
    {
        $parents  = static::select('parent_id')->whereNotNull('parent_id')->distinct()->get()->pluck('parent_id')->all();
        return static::wherenotin('id',$parents);
    }
public static function getLeaves()
    {
        $parents  = static::select('parent_id')->whereNotNull('parent_id')->distinct()->get()->pluck('parent_id')->all();
        return static::wherenotin('id',$parents);
    }
public static function getLeaves ( ) { $ parents = static :: select ( 'parent_id' ) -> whereNotNull ( 'parent_id' ) -> distinct ( ) -> get ( ) -> pluck ( 'parent_id' ) -> all ( ) ; return static :: wherenotin ( 'id' , $ parents ) ; }
Gets all leaf nodes

@return \Illuminate\Database\Eloquent\Builder
Gets all leaf nodes