php artisan tinker
<?
#
$res = \DB::table('models');
$res->where("create_at", ">=", "2018-04-04");
$res->rightJoin('obligation_subjects', function ($join) {
$join->on('accruals.obligation_subjects_id', '=', 'obligation_subjects.id');
});
$res->orderBy('create_at', 'desc');
<?
# with must be last
$res = Model::query();
$res->where("create_at", ">=", "2018-04-04");
$res->with(['obligationSubjects.Obligation',
'obligationSubjects.Obligation.obligationSubjects',
'obligationSubjects.Subject']);
Create
post::create([
'body' =>request('body')
]) ;
| |
|
| |
|
| {{ csrf_field() }} |
токен защиты |
| redirect('/') |
|
| |
|