ajax
昊喵喵博士
昊喵喵博士,欢迎大家一起来纠正和沟通问题(相互沟通是走向巅峰的一种捷径)
展开
-
jQuery 遍历
遍历数组 var text = "Array "; jQuery.each(arr, function(i, val) { text = text + " #Index:" + i + ":" + val; }); console.log(text); 遍历对象 text = "Object "; jQuery.each(obj, function(...翻译 2018-12-10 14:07:15 · 164 阅读 · 0 评论 -
laravel 跨域
1、 建立中间件Cors.php 命令:php artisan make:middleware Cors 在/app/Http/Middleware/ 目录下会出现一个Cors.php 文件。 2、 在handle 方法中加入如下内容: $response = $next($request); $response->header('Ac...原创 2018-12-17 15:26:54 · 404 阅读 · 0 评论 -
laravel 软删除
1、首先在模型中要使用SoftDeletestrait,该trait为软删除提供一系列相关方法,具体可参考源码Illuminate\Database\Eloquent\SoftDeletes ,此外还要设置$date属性数组,将deleted_at置于其中 <?php namespace App\Model\Backend; use App\Http\Response; use I...翻译 2018-12-24 11:31:19 · 136 阅读 · 0 评论