小白兔晒黑了

导航

 
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 27 下一页

2020年7月30日

摘要: Laravel队列服务为各种不同的后台队列提供了统一的api。例如:允许推迟耗时任务(例如发送邮件)的执行,从而大幅提高web请求速度、 步骤: 1 迁移队列需要的数据表 2 编写任务类 3 推送任务到队列 4 运行队列监听器 5 处理失败的任务 使用: 1 配置 \config\queue.php 阅读全文
posted @ 2020-07-30 20:26 小白兔晒黑了 阅读(196) 评论(0) 推荐(0) 编辑
 

2020年7月29日

摘要: 配置文件 \.env 开发模式 APP_DEBUG=true 线上模式 APP_DEBUG=false HTTP错误代码 public function error() { $error = true; if($error){ abort(503); } } 跳转到503页面 日志 LOG_CHAN 阅读全文
posted @ 2020-07-29 22:24 小白兔晒黑了 阅读(517) 评论(0) 推荐(0) 编辑
 
摘要: Laravel为各种不同的缓存系统提供一致的API Laravel支持各种常见的后端缓存系统,如File Memcached和Redis 主要方法 put() add() forever() get() pull() forget() has() 使用方式 use Illuminate\Suppor 阅读全文
posted @ 2020-07-29 17:44 小白兔晒黑了 阅读(646) 评论(0) 推荐(0) 编辑
 

2020年7月28日

摘要: 1 开通smtp生成的授权码 2 配置 \config\mail.php 配置你发件邮箱 .env MAIL_DRIVER=smtp //因为laravel其他邮件发送方式要么有数量限制要么收费,所以在这里还是选smtp发送 MAIL_HOST=smtp.qq.com MAIL_PORT=465 / 阅读全文
posted @ 2020-07-28 22:04 小白兔晒黑了 阅读(427) 评论(0) 推荐(0) 编辑
 

2020年7月24日

摘要: 1 配置文件 config\filesystems.php 复制一个配置 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'vis 阅读全文
posted @ 2020-07-24 00:43 小白兔晒黑了 阅读(253) 评论(0) 推荐(0) 编辑
 

2020年7月22日

摘要: 1 创建控制器 php artisan make:controller TestController 2 创建模型 php artisan make:model Test 3 创建中间件 php artisan make:middleware Activity 阅读全文
posted @ 2020-07-22 16:23 小白兔晒黑了 阅读(190) 评论(0) 推荐(0) 编辑
 
摘要: 1 视图 <td> <a href="{{url('student/show',['id'=>$student->id])}}">详情</a> <a href="{{url('student/update',['id'=>$student->id])}}">修改</a> <a href="{{url 阅读全文
posted @ 2020-07-22 01:16 小白兔晒黑了 阅读(330) 评论(0) 推荐(0) 编辑
 

2020年7月21日

摘要: 1 模型 const GENDER_UN = 10;//未知 const GENDER_BOY = 20;//男 CONST GENDER_GRIL= 30;//女 public function gender($ind = null) { $arr = [ self::GENDER_UN=>'未知 阅读全文
posted @ 2020-07-21 01:49 小白兔晒黑了 阅读(279) 评论(0) 推荐(0) 编辑
 

2020年7月20日

摘要: 1 控制器表单验证 1.1 控制器 public function create(Request $request) { if ($request->isMethod('POST')){ //web中间件会自动捕获 保存到session中,并显示到view $this->validate($requ 阅读全文
posted @ 2020-07-20 17:59 小白兔晒黑了 阅读(531) 评论(0) 推荐(0) 编辑
 

2020年7月17日

摘要: $students = Student::paginate(2);和{{$students->render()}}两行代码搞定 C public function index() { //$students = Student::get(); //(每页显示的个数) $students = Stud 阅读全文
posted @ 2020-07-17 01:48 小白兔晒黑了 阅读(337) 评论(0) 推荐(0) 编辑
 
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 27 下一页