Installer.php 692 Bytes
Newer Older
冯超鹏's avatar
冯超鹏 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php
namespace App\Laravue\Models;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Laravel\Passport\HasApiTokens;
use Spatie\Permission\Traits\HasRoles;

class Installer extends Authenticatable
{
    use Notifiable, HasRoles, HasApiTokens;
    protected $table = "installer";
    public $timestamps = false;
    //添加装维人员
    public function addinstall($data = []) : string {
        foreach ($data as $k => $value) {
            if (is_null($k)) {
                return '用户提交表单参数错误';
            }
        }
        $datadevice['addtime'] = time();
        return $this->insertGetId($datadevice);
    }
}