attachment附件
1$attachment=storage_path('images/zhu.png');
$message->attach($attachment,['as'=>'zhu.png']);
2
storage_path()
$img=Storage::get(storage_path().'/images/zhu.png');
Storage::get(public_path().'/images/catalog/'.$product->sku.'.jpg');
3验证码
publicfunctionverify()
{
$builder=newCaptchaBuilder();
$builder->initialize([
'width'=>110,//宽度
'height'=>34,//高度
'line'=>false,//直线
'curve'=>true,//曲线
'noise'=>false,//噪点背景
'fonts'=>[]//字体
]);
$builder->create()->output(1);
$phrase=$builder->getText();
//Session::flash('milkcaptcha',$phrase);
//session(['milkcaptcha'=>$phrase]);
Session::put('milkcaptcha',$phrase);
//$_SESSION['milkcaptcha']=$phrase;
Session::save();