Skip to content

Passing data to React frontend #7570

Answered by aklos
aklos asked this question in Troubleshooting
Feb 19, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

I've solved the problem by implementing my own Facade like so:

<?php

namespace App\Facades;

use Illuminate\Support\Facades\Facade;
use Statamic\Contracts\Structures\NavTreeRepository;

class NavTree extends Facade
{
    protected static function getFacadeAccessor()
    {
        return NavTreeRepository::class;
    }
}

NavTreeRepository has a find method, which gives me the data I need.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by aklos
Comment options

You must be logged in to vote
1 reply
@aklos
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants