Created
January 23, 2023 11:54
-
-
Save estudijoanpuig/afed4da5a6923633de195701557fc99c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Route::get('/codes', function () { | |
$codes= Code::select( | |
"codes.id", | |
"codes.nom", | |
"codes.slug", | |
"codes.img", | |
"codes.category_id", | |
"codes.tag_id", | |
"codes.descripcio", | |
"codes.blockcode", | |
"categories.category_nom as lacategoria", | |
"tags.tag_nom as eltag", | |
) | |
->join("categories", "categories.id", "=", "category_id") | |
->join("tags", "tags.id", "=", "tag_id") | |
->wherein('category_id', [8, 9, 10, 11, 12, 13, 14, 15, 16]) | |
->orderBy('nom', 'ASC') | |
->get(); | |
return view('codes', compact('codes')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment