Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $category = Category::select("oc_category_path.category_id AS id" , DB::raw("GROUP_CONCAT(oc_category_description.name ORDER BY oc_category_path.level SEPARATOR ' > ' AS 'text') "))
- ->from("oc_category_path cp")
- ->leftJoin("oc_category c", "cp.path_id", "=", "c.category_id")
- ->leftJoin("oc_category_description cd1", "c.category_id", "=", "cd1.category_id")
- ->leftJoin("oc_category_description cd2 ","cp.category_id","=" ,"cd2.category_id")
- ->where("cd1.language_id = 1","cd2.language_id = 1")
- ->groupBy("cp.category_id")
- ->orderBy("text")
- ->get();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement