Laravel给request变量赋值,追加参数,修改参数
2022-11-08 leiting (2490阅读)
标签 PHP
$request->merge(['ver' => 'V1']);
//添加一个request字段,customer_id request()->offsetSet('customer_id', $customer->id); dd(request(customer_id)); //或者 if(!$request->state){ request()->offsetSet('state', '0'); }
最新评论:
最新评论: