惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - facewater

Error: Permission denied @ apply2files Error: Cannot find module 'internal/fs' pecl install imagick CentOS 7.0系统安装配置LAMP服务器(Apache+PHP+MariaDB) ionic hybrid备忘 pod 出错备忘 kwm备忘 mysql用shell建100多字段表并导入 mac下python实现vmstat 桌面oracle 11g导入多年库的dump备忘 Linux64位服务器编译安装MySQL5.6(CentOS6.4) 64位Linux下编译搭建Nginx1.5与PHP5.5(CentOS6.4) linux 环境变量 yii2高级应用 android 九宫加密记事本 EZGUI下的动态图片的处理 Unity3D]引擎崩溃、异常、警告、BUG与提示总结及解决方法 u3d动态加入模型 Unity3d 在不同设备中的文件读写 的路径
架设laravel
facewater · 2015-10-16 · via 博客园 - facewater

用laravel 架设的用户单点登录授权系统,git clone项目文件后,需要下面的方法初始化,纪录以供项目成员参考 

错误信息:`Warning: require(/http/www.mywakavLee.cn/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /http/www.mywakavLee.cn/bootstrap/autoload.php on line 17

Fatal error: require(): Failed opening required ‘/http/www.mywakavLee.cn/bootstrap/../vendor/autoload.php’ (include_path=’.:/usr/local/lib/php’) in /http/www.mywakavLee.cn/bootstrap/autoload.php on line 17`

原因:网站根目录下缺少vendor这个存放laraver依赖包的目录 

解决方法:使用composer install进行安装(以前安装过的话使用:composer update) 

只出现一行Whoops, looks like something went wrong

解决:config/app.php 修改:'debug' => true

No supported encrypter found. The cipher and / or key length are invalid

解决:网站所在目录下执行命令 php artisan key:generate
将生成的key复制到config/app.php的APP_KEY键值。

然后mysql连接出错,没有配置数据库,

解决:添加.env文件,配置其中mysql 再执行导入数据库命令:php artisan migrate --path=database/migrations

apache .htaccess

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

nginx

location / { try_files $uri $uri/ /index.php?$query_string; }

查看命令php artisan list 

如添加controller文件 php artisan make:Controller  XxxController

开发过程经常出现NotFoundHttpException in RouteCollection.php line 143:原因没有正确配置路由routes.php

 添加英文语言包到resources/lang ,配置config/app.php内的

'locale' => 'zh-CN',
model字段和验证信息翻译成中文,
public $customeAttributes = [ 'name' => '唯一标识',
'display_name'=>'角色名',
'discription'=>'描述'
];
$this->validate($request, [
'name' => 'required|unique:roles|max:255',
'display_name' => 'required',
],[],
$this->customeAttributes);
model内的各种设定
public $table = 'permission_role';
public $timestamps = false;//不添加created_at,updated_at
//protected $fillable = ['description', 'display_name'];//开启白名单字段,可以更改
protected $guarded = [];//保护字段,防止注入和上面的$fillable只可以有一个