user()) || (! $request->user()->isOwner())) { return response()->json([ 'success' => false, 'message' => 'You are not allowed to update this app.' ], 401); } $request->validate([ 'path' => 'required', ]); $path = Updater::copyFiles($request->path); return response()->json([ 'success' => true, 'path' => $path, ]); } }