0
0

更新代码

This commit is contained in:
2020-08-04 10:09:42 +08:00
parent 6118b5b63b
commit c2ac5d964e
478 changed files with 34410 additions and 0 deletions

37
app/Models/KeysApply.php Normal file
View File

@@ -0,0 +1,37 @@
<?php
namespace App\Models;
class KeysApply extends Model
{
public function getIsPrintTextAttribute()
{
switch ($this->is_print) {
case 0:
return '<span style="color:blue">否</span>';
break;
case 1:
return '<span style="color:green">是</span>';
break;
}
}
protected function getStatusTextAttribute()
{
if ($this->status == 0) {
return '<span style="color: green">申请中</span>';
} elseif ($this->status == 1) {
return '<span style="color: orangered">已生成</span>';
} elseif ($this->status == 2) {
return '<span style="color: orangered">已驳回</span>';
} else {
return $this->status;
}
}
public function user()
{
return $this->belongsTo(\App\User::class);
}
}