Skip to content
Advertisement

I want to write this MySql Query in Laravel Controller [closed]

SELECT user_matches.*
FROM users u
JOIN user_matches
    ON u.id = user_matches.user_id AND 
        FIND_IN_SET(
            user_matches.to_user_id,
            (
                SELECT GROUP_CONCAT(users.id) FROM `users`
            )
        );

Advertisement

Answer

Do it with

IlluminateSupportFacadesDB::select('') 

to write you raw query .

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement