brew tap kyslik/php
brew options php71
brew install php71 --with-httpd
因为是利用ueditor编辑器上传图片,打开他的配置文件\config\ueditor.php用到的存储是'disk' => 'public'。然后打开\config\filesystems.php 修改 'public' 下面的root及url就行了,比如改成public_path(...)
那为什么改成 Route::get('topics','QuestionController@topics')->middleware('api');
这样就报错呢
遇到个非常奇怪的问题,之前这么写,可以获得topics列表数据
Route::middleware('api')->get('/topics', function (Request $request) {
return \App\Topic::select(['id', 'name'])
// api/topics?q=lar
->where('name', 'like', '%'.$request->query('q').'%')
->get();
});
但是改为下面的,报401 Unauthorized
Route::get('topics','QuestionController@topics')->middleware('api');
bootstrap.js 中我也加入了
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
百思不得奇解
活动终止!2017-06-22 11:30 之后的申请都不接受了。活动已终止!活动原由:感谢 UCloud 赞助 Laravist, 赞助内容见这里:点开链接活动优惠1.100 块 UCloud 的无限制使用券!2.没订阅 Laravist 全站视频的用户,免费观看 Laravist 所有视频!
Auth::guard('api')->user() 和 Auth::user() 有什么区别
Jelly太监了。。
可以搜索 “Laravel 消息队列“有相关的文章