123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\Repositories\Models\Base;
- use App\Repositories\Models\Model;
- class Job extends Model
- {
- /**
- * @var string
- */
- protected $table = 'base_jobs';
- /**
- * The attributes that are mass assignable.
- *
- * @var array
- */
- protected $guarded = [];
- /**
- * The attributes excluded from the model's JSON form.
- *
- * @var array
- */
- protected $hidden = [
- ];
- public static function checkCodeIsUnique($code, $ignore_id = 0)
- {
- return self::query()->where('code', $code)->where('id', '<>', $ignore_id)->exists();
- }
- }
|