mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-06 13:34:50 +08:00
23 lines
420 B
PHP
23 lines
420 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Texture extends Model
|
|
{
|
|
public $primaryKey = 'tid';
|
|
public $timestamps = false;
|
|
|
|
public function setPrivacy($public)
|
|
{
|
|
$this->public = $public ? "1" : "0";
|
|
return $this->save();
|
|
}
|
|
|
|
public function scopeLike($query, $field, $value)
|
|
{
|
|
return $query->where($field, 'LIKE', "%$value%");
|
|
}
|
|
}
|