Please add second WHERE:
$categories = Category::where('user_id', $user_id)
->where('status', 1)
->get();
In this code we use this code ->where('status', 1)
as second where please modify according to your code