Laravel相关知识

1.开启debug:修改config目录下的app.php

‘debug’ => env(‘APP_DEBUG’, true),

 

2.The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

文件跟目录.env文件

在文件跟目录执行

php artisan key:generate

Laravel项目部署到Nginx服务器除了/目录,全飘404

[Illuminate\Database\QueryException]
could not find driver (SQL: select * from information_schema.tables where t
able_schema = suyuandb and table_name = migrations)

[PDOException]
could not find driver

 

解决方式

找到php.int

打开

On windows:
extension_dir = “ext”

extension=php_pdo_mysql.dll

 

 

php artisan tinker

$bsuser1->created_at=Carbon\Carbon::now();

$bsuser3=App\BSUser::find(1);

保存
->save();
查看属性
->toArray();
查看
=App\BSUser::find(id);

=App\BSUser::where(‘字段’,’内容’)->get();

=App\BSUser::where(‘account’,’13671172337′)->get();
符合要求的第一条数据
$bsuser=App\BSUser::where(‘account’,’13671172337′)->first();

另一种创建方式
$bsuser=App\BSUser::create([‘属性’=>’内容’,’属性’=>’内容’]);

更新的另一种方式
$bsuser=update([‘属性’=>’内容’]);

 

Laravel5.2基于laravelcollective/html使用Form和HTML

 

mac composer 安装

 

分享到:

发表评论

沙发空缺中,还不快抢~