/
home
/
henzagold
/
server
/
app
/
Te
/
File Upload :
llllll
Current File: /home/henzagold/server/app/Te/query.example.php
<?php return [ 'sample_one' => [ 'model' => \App\MyModel::class, 'cols' => "name,code", 'select' => ['id as value', 'name as label'] ], 'sample_two' => [ 'fn' => function ($query) { return \App\DB\MyModel::whereHas('cls', function ($q) { return $q->where('term_id', 2)->where('teacher_id', 1); }) ->select(['id as value', 'title as label']) ->where('title', 'LIKE', '%' . $query . '%') ->orWhere('code', 'LIKE', '%' . $query . '%') ->get() ->toArray(); }, ], 'sample_three' => [ 'model' => \App\DB\MyModel::class, 'cols' => "title", 'where' => [['sts', '>', '0']], 'select' => ['id as value', 'title as label'] ], 'sample_four' => [ 'model' => \App\DB\MyModel::class, 'cols' => "title", 'where' => [['w', 'course_level']], 'select' => ['id as value', 'title as label'] ] ];
Copyright ©2k19 -
Hexid
|
Tex7ure