27 lines
477 B
PHP
Executable File
27 lines
477 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class BookHook extends Model
|
|
{
|
|
protected $table = 'book_hook';
|
|
public $timestamps = false;
|
|
|
|
public static function _first($sType)
|
|
{
|
|
$oData = self::where("type", $sType)->first();
|
|
|
|
return $oData;
|
|
}
|
|
|
|
public static function _first_key($sType)
|
|
{
|
|
$sKey = self::where("type", $sType)->first()?->key;
|
|
|
|
return $sKey;
|
|
}
|
|
|
|
}
|