会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小白兔晒黑了
导航
博客园
首页
新随笔
联系
订阅
管理
公告
上一页
1
···
17
18
19
20
21
22
23
24
25
···
32
下一页
2020年7月28日
Laravel 发送邮件 SwiftMailer 以qq邮箱为例
摘要: 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 小白兔晒黑了
阅读(460)
评论(0)
推荐(0)
2020年7月24日
Laravel 文件上传
摘要: 1 配置文件 config\filesystems.php 复制一个配置 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'vis
阅读全文
posted @ 2020-07-24 00:43 小白兔晒黑了
阅读(259)
评论(0)
推荐(0)
2020年7月22日
Laravel artisan基本用法
摘要: 1 创建控制器 php artisan make:controller TestController 2 创建模型 php artisan make:model Test 3 创建中间件 php artisan make:middleware Activity
阅读全文
posted @ 2020-07-22 16:23 小白兔晒黑了
阅读(200)
评论(0)
推荐(0)
Laravel 增删改查 操作
摘要: 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 小白兔晒黑了
阅读(346)
评论(0)
推荐(0)
2020年7月21日
Laravel 通过模型处理性别
摘要: 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 小白兔晒黑了
阅读(290)
评论(0)
推荐(0)
2020年7月20日
Laravel 控制器表单验证与Validator类验证
摘要: 1 控制器表单验证 1.1 控制器 public function create(Request $request) { if ($request->isMethod('POST')){ //web中间件会自动捕获 保存到session中,并显示到view $this->validate($requ
阅读全文
posted @ 2020-07-20 17:59 小白兔晒黑了
阅读(551)
评论(0)
推荐(0)
2020年7月17日
Laravel 分页功能
摘要: $students = Student::paginate(2);和{{$students->render()}}两行代码搞定 C public function index() { //$students = Student::get(); //(每页显示的个数) $students = Stud
阅读全文
posted @ 2020-07-17 01:48 小白兔晒黑了
阅读(344)
评论(0)
推荐(0)
2020年7月16日
Laravel 静态资源管理及表单布局
摘要: 1 导入扩展库 项目地址 https://github.com/happyHou/laravel_form
阅读全文
posted @ 2020-07-16 22:08 小白兔晒黑了
阅读(158)
评论(0)
推荐(0)
Laravel 中间件的使用(前置与后置)
摘要: 中间件的作用: 过滤进入应用程序的http请求。 比如,有一个活动,在活动开始前进入活动页则跳转到宣传页 使用步骤: 1 创建中间件 \app\Http\Middleware\Activity.php php artisan make:middleware Activity <?php namesp
阅读全文
posted @ 2020-07-16 17:13 小白兔晒黑了
阅读(2376)
评论(0)
推荐(0)
2020年7月14日
Laravel 中的模板中的url
摘要: 三个方法:url() 、action()、route() 都可以跳转 1 路由设置 \routes\web.php Route::any('url',['as'=>'url','uses'=>'StudentController@urlTest']); 2 添加action \app\Http\Co
阅读全文
posted @ 2020-07-14 20:33 小白兔晒黑了
阅读(517)
评论(0)
推荐(0)
上一页
1
···
17
18
19
20
21
22
23
24
25
···
32
下一页