loading...

disable view on laravel nova attach

anditsung profile image anditsung ・1 min read

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;
}

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

Discussion

pic
Editor guide