Example of HasManyThrough in akaunting/akaunting

File app/Models/Common/Widget.php (link to Github)
use App\Abstracts\Model;

class Widget extends Model
{
    //
    public function users()
    {
        return $this->hasManyThrough('App\Models\Auth\User', 'App\Models\Common\Dashboard');
    }
    //
}

Additional resources on HasManyThrough: