2019-01-12无级分类Demoid pid controller /** * 加载视图 * @return [type] [description] */ public function goods_group() { // 从数据库获取所有分类记录 $goods_group = \App\Goods_group::orderBy('sort','desc')->get(); // 将分
2019-01-10laravel 分页自定义原始分页真是太难看了,如上 laravel很人性化的给我们提供了样式,在public/css里面有个app.css文件, 我 们只需要再视图引入它就好了 如果想自定义,可以使用 php artisan vendor:publish laravel把自带的样式拷贝到了我们项目的视图目录下面的vendor文件夹 resources/view/pagination
2019-01-10laravel多条件排序$goods = Goods::orderBy('created_at','desc')->orderBy('id','desc')->paginate(6);
2019-01-10laravel 分页带参数url public/admin/goods?status=0&page=2 c $status = \Request::get('status'); return view("admin/goods/goods",compact('status')); v {{ $goods->appends(['status' => 0])->links() }}
2019-01-10Laravel 出现"RuntimeException inEncrypter.php line 43: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths."问题的解决办法Laravel 出现"RuntimeException inEncrypter.php line 43: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths."问题的解决办法 php artisan key:generate 这时候项目
2019-01-10laravel 在ajax请求下无法保存session无法保存 session(['admin'=>$res[0]]); 可以保存 \Session::put('admin',$res[0]); // 你要保存的session key \Session::save();
2019-01-03小程序 | 生成海报并保存到相册index.js //index.js //获取应用实例 Page({ data: { cardInfo: { avater: "https://tool.wangmingchang.com/api/pic/rand_pic.html?name=bing&type=1", //需要https图片路径 qrCode: "https://ws3.sinaimg.
2019-01-03小程序反编译 | 获取小程序源码 D:\wxappUnpacker-master `-- [email protected] npm WARN Invalid version: "0.3" npm WARN wxappUnpacker-master No description npm WARN wxappUnpacker-master No repository field. npm WARN
2019-01-02转载 | 对象(object) 与 数组(array) 的转换/** * 数组 转 对象 * * @param array $arr 数组 * @return object */ function array_to_object($arr) { if (gettype($arr) != 'array') { return; } foreach ($arr as $k => $v) { if (gettype($v) =