davy_yg
324
4
Laravel

Method Illuminate\Database\Eloquent\Collection::join

Posted 5 months ago by davy_yg

Hello,

How to fix this error message:

Method Illuminate\Database\Eloquent\Collection::join does not exist.

PageController.php

public function application()
    {
        $data2 = ApplicationModel::all()
            ->join('tb_detail', function ($join) {
                $join->on('detail_id','=','detail_id');
            })
            ->get();

        // $data = ApplicationModel::all();

        return view('admin.application')->with('list', $data2);
    }

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.