Commit d151b6bc authored by 王源's avatar 王源 🎧

Merge branch 'master' into 2.0

parents fc516801 74014251
...@@ -25,7 +25,7 @@ class ExceptionLogProducer extends ProducerMessage ...@@ -25,7 +25,7 @@ class ExceptionLogProducer extends ProducerMessage
} }
// 获取trace中真实文件和行数 // 获取trace中真实文件和行数
if (!empty($data['trace'])) { if (!empty($data['trace'])) {
preg_match('/(\/var\/www\/html\/.+?\/app\/.+?\.php)(?=\()/', $data['trace'], $matchFiles); preg_match('/(\/var\/www\/app\/.+?\.php)(?=\()/', $data['trace'], $matchFiles);
if (!empty($matchFiles[0])) { if (!empty($matchFiles[0])) {
$data['file'] = $matchFiles[0]; $data['file'] = $matchFiles[0];
$file = str_replace('/', '\/', $matchFiles[0]); $file = str_replace('/', '\/', $matchFiles[0]);
...@@ -39,7 +39,7 @@ class ExceptionLogProducer extends ProducerMessage ...@@ -39,7 +39,7 @@ class ExceptionLogProducer extends ProducerMessage
} }
if (!empty($data['file'])) { if (!empty($data['file'])) {
// 只对项目app文件夹下的错误获取编码人 // 只对项目app文件夹下的错误获取编码人
preg_match('/(\/var\/www\/html\/.+?\/app\/)/', $data['file'], $matchPaths); preg_match('/(\/var\/www\/app\/)/', $data['file'], $matchPaths);
if (!empty($matchPaths[0])) { if (!empty($matchPaths[0])) {
try { try {
exec("cd {$matchPaths[0]} && git blame -L {$data['line']},{$data['line']} {$data['file']}", $output); exec("cd {$matchPaths[0]} && git blame -L {$data['line']},{$data['line']} {$data['file']}", $output);
......
...@@ -18,18 +18,18 @@ namespace App\Model; ...@@ -18,18 +18,18 @@ namespace App\Model;
*/ */
class %ClassName% extends Model class %ClassName% extends Model
{ {
%SoftDelete% %SoftDelete%
/** /**
* 是否使用时间戳管理 * 是否使用时间戳管理
* @var bool * @var bool
*/
public $timestamps = %timestamps%;
/**
* 可写入数据的字段.
* @var array
*/ */
public $timestamps = %timestamps%;
/**
* 可写入数据的字段.
* @var array
*/
protected $fillable = [ protected $fillable = [
%fillAble% %fillAble%
]; ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment