Laravel subkaperia z klauzuli

DB::table(DB::raw("({$query->toSql()}) as alias") )
Website_amz