Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Como converter mysql para construtor de consultas laravel

$results = DB::select(
    select * from pages where (phase_id, type) 
    in (
        select max(phase_id), type 
        from pages 
        where phase_id <= 2 
        and actived = 1 
        group by type
    ) 
    and actived = 1
);