DEV Community 👩‍💻👨‍💻


Posted on

disable view on laravel nova attach

to disable view on attach item add this to the resource that want to be disable to view

public function authorizedToView(Request $request)
    if($request->query->get("viaResource")) {
        return false; 
    return true;
Enter fullscreen mode Exit fullscreen mode

"$request->query->get("viaResource")" to find if the resource is accessed from other resource

Top comments (0)

19 Valuable Github Repositories for Beginners

19 Valuable GitHub Repositories for beginner devs looking to take the first step into the web development career.