laravel 在ajax请求下无法保存session
无法保存 session(['admin'=>$res[0]]); 可以保存 \Session::put('admin',$res[0]); // 你要保存的session key \Session::save();
无法保存 session(['admin'=>$res[0]]); 可以保存 \Session::put('admin',$res[0]); // 你要保存的session key \Session::save();
参考文档 http://www.yiichina.com/doc/guide/2.0 下载composer 安装yii2 https://packagist.org/packages/yiisoft/yii2-app-basic //安装插...
缓存优化 数据库查询缓存优化 数据库字段 show COLUMNS from 'user' //查询数据表的字段 生成数据表的缓存文件 php think optimize:schema //生成的目录在runtime/schema 路由 ...
公共专题列表 视图合成器 \View::composer('mobandizhi',function($view){ //加载 }) 使用 位置\app\Providers\AppServiceProvider.php public fun...
搜索 elasticsearch https://www.elastic.co/cn/ https://github.com/medcl/elasticsearch-analysis-ik 文档 elasticsearch基本概念 索引in...
服务容器 绑定(使用bind 或 singleton) public/indx.php下的 $app = require_once __DIR__.'/../bootstrap/app.php'; app.php 下(字符串绑定到对象中) ...
laravel中文网 https://laravel-china.org/ 支持: 队列 搜索 数据库迁移 定时脚本 数据填充包 https://github.com/fzaninotto/Faker laravel思想 服务容器 服务提供...
获取header中的参数 $appkey = Request::instance()->header();
方法 /** *获取某个目录下的php文件名的函数 */ function getControllers($dir) { $pathList = glob($dir . '/*.php'); $res = []; foreach($path...
/** * 修改扩展配置文件 * @param array $arr 需要更新或添加的配置 * @param string $file 配置文件名(不需要后辍) * @return bool */ function extraconfig(...