I am unable to write this query in laravel using query builder:
```
SELECT pt.name, IF(up.permission_id IS NULL,'false','true') permission
FROM mercuri_permission_type pt
LEFT OUTER JOIN mercuri_user_permission up
ON pt.id = up.permission_id AND up.user_id = $user_id
```
You should do multi left join
to handle this; But I suggest you use doctrine ORM and run this query on doctrine. In order to use Doctrine in Laravel the links below would be useful:
Getting started doctrine 2 laravel
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.