|
|
|
|
@ -44,7 +44,7 @@ class TeacherController extends BaseController
|
|
|
|
|
public function index()
|
|
|
|
|
{
|
|
|
|
|
$all = request()->all();
|
|
|
|
|
$list = $this->model->with('courseContents.course')->where(function ($query) use ($all) {
|
|
|
|
|
$list = $this->model->with('courseContents.course','courseContents.directionDetail')->where(function ($query) use ($all) {
|
|
|
|
|
if (isset($all['filter']) && !empty($all['filter'])) {
|
|
|
|
|
foreach ($all['filter'] as $condition) {
|
|
|
|
|
$key = $condition['key'] ?? null;
|
|
|
|
|
|