Laravel
  • Introduction
  • 常用語法
  • 結合Vue.js從無到有架設一個網站
  • 透過CMD新增File
  • Schedule
  • Annotation
  • Super Variable
  • API的設定
  • Create 新專案
  • Raw Expressions
  • Import - Export
  • JWT 外加 登入功能
  • Carbon
  • Storage 保存文件
  • Require_once
  • 設定apache將laravel專案run起來
  • 有關leftjoin的用法
  • Advanced Join Clauses
  • Call API方式
  • 產生新的APP_KEY
  • 程序優化技巧
  • composer update VS 手動丟檔
  • 全域變數被使用過
  • FB的SDK
Powered by GitBook
On this page

Was this helpful?

有關leftjoin的用法

當你leftjoin要下兩個以上的條件的話,可以像以下這樣做

isCarMemberOwnCar::leftJoin('iscarmemberowncarpic', function ($join) {
                             $join->on('iscarmemberowncar.moc_id', '=', 'iscarmemberowncarpic.moc_id')
                                  ->where('iscarmemberowncarpic.isflag',1)
                                  ->where('iscarmemberowncarpic.mocp_picscategory',0);
                           });

可以直接包一個function在括號裡,直接加上你要的條件,幾條都可以

Previous設定apache將laravel專案run起來NextAdvanced Join Clauses

Last updated 5 years ago

Was this helpful?