上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 61 下一页
摘要: laravel请求表单验证 定义路由首先,我们假定在 routes/web.php 文件中包含如下路由:1// 显示创建博客文章表单...2Route::get('post/create', 'PostController@create');3// 存储新的博客文章...Route::post('p 阅读全文
posted @ 2022-01-14 14:24 学无边涯 阅读(70) 评论(0) 推荐(0)
摘要: 要生成一个填充器,可以通过 Artisan 命令 make:seeder。所有框架生成的填充器都位于 database/seeds 目录 php artisan make:seeder UsersTableSeeder <?php use Illuminate\Database\Seeder;use 阅读全文
posted @ 2022-01-03 13:40 学无边涯 阅读(113) 评论(0) 推荐(0)
摘要: 1,使用 Artisan 命令 make:migration 就可以创建一个新的迁移 php artisan make:migration create_users_table 迁移类包含了两个方法:up 和 down。up 方法用于新增表,列或者索引到数据库,而 down 方法就是 up 方法的逆 阅读全文
posted @ 2022-01-03 13:36 学无边涯 阅读(226) 评论(0) 推荐(0)
摘要: 1,查看所有的 list php artisan list 2,创建控制器 php artisan make:controller TaskController 3,创建模型 php artisan make:model user 4,创建中间件 php artisan make:middlewar 阅读全文
posted @ 2022-01-02 18:21 学无边涯 阅读(75) 评论(0) 推荐(0)
摘要: Laravel 通过自带的 CSRF 保护中间件让避免应用遭到跨站请求伪造攻击变得简单:Laravel 会自动为每一个被应用管理的有效用户会话生成一个 CSRF “令牌”,然后将该令牌存放在 Session 中,该令牌用于验证授权用户和发起请求者是否是同一个人。 <form method="POST 阅读全文
posted @ 2022-01-02 14:18 学无边涯 阅读(167) 评论(0) 推荐(0)
摘要: laravel COOKIE 获取 use Illuminate\Http\Request;use Illuminate\Support\Facades\Cookie;class TaskController extends Controller{ // public function index( 阅读全文
posted @ 2022-01-01 21:41 学无边涯 阅读(459) 评论(0) 推荐(0)
摘要: 1,composer create-project --prefer-dist laravel/laravel blog "5.6.*" 2,php artisan serve composer create-project --prefer-dist laravel/laravel blog "5 阅读全文
posted @ 2022-01-01 20:54 学无边涯 阅读(127) 评论(0) 推荐(1)
摘要: 定义中间件 php artisan make:middleware CheckToken <?php namespace App\Http\Middleware; use Closure; class BeforeMiddleware{ public function handle($request 阅读全文
posted @ 2022-01-01 20:53 学无边涯 阅读(116) 评论(0) 推荐(0)
摘要: 子组件 <template><div> <h1>{{two}}</h1></div></template><script>export default { name: "Subcomp", props:['one','two'], data(){ return{ msg:'12121' } }}</ 阅读全文
posted @ 2021-12-19 11:17 学无边涯 阅读(167) 评论(0) 推荐(0)
摘要: 在小程序中所有页面的路由全部由框架进行管理。 开发者可以使用 getCurrentPages() 函数获取当前页面栈。 1,初始化 onLoad, onShow 2,打开新页面 调用 API wx.navigateTo使用组件 <navigator open-type="navigateTo"/> 阅读全文
posted @ 2021-12-18 09:09 学无边涯 阅读(353) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 61 下一页