|
@@ -1,23 +1,9 @@
|
|
|
<?php
|
|
<?php
|
|
|
-
|
|
|
|
|
namespace App\Models;
|
|
namespace App\Models;
|
|
|
-
|
|
|
|
|
use App\Services\IssueService;
|
|
use App\Services\IssueService;
|
|
|
-use Illuminate\Database\Eloquent\Builder;
|
|
|
|
|
-use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
|
|
|
-use Illuminate\Notifications\Notifiable;
|
|
|
|
|
-use Laravel\Sanctum\HasApiTokens;
|
|
|
|
|
-
|
|
|
|
|
-/**
|
|
|
|
|
- * Bet
|
|
|
|
|
- * @mixin Builder
|
|
|
|
|
- * @method static Builder|static where($column, $operator = null, $value = null, $boolean = 'and')
|
|
|
|
|
- */
|
|
|
|
|
-class Issue extends Authenticatable
|
|
|
|
|
|
|
+class Issue extends BaseModel
|
|
|
{
|
|
{
|
|
|
- use HasApiTokens, Notifiable;
|
|
|
|
|
protected $table = 'issues';
|
|
protected $table = 'issues';
|
|
|
- // protected $hidden = ['created_at', 'updated_at'];
|
|
|
|
|
protected $fillable = ['issue_no', 'start_time', 'end_time', 'winning_numbers', 'status', 'combo', 'extreme', 'image'];
|
|
protected $fillable = ['issue_no', 'start_time', 'end_time', 'winning_numbers', 'status', 'combo', 'extreme', 'image'];
|
|
|
protected $appends = [
|
|
protected $appends = [
|
|
|
'award',
|
|
'award',
|
|
@@ -83,24 +69,4 @@ class Issue extends Authenticatable
|
|
|
return $array[$val];
|
|
return $array[$val];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- protected function getCreatedAtAttribute($value)
|
|
|
|
|
- {
|
|
|
|
|
- return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- protected function getUpdatedAtAttribute($value)
|
|
|
|
|
- {
|
|
|
|
|
- return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // public function children()
|
|
|
|
|
- // {
|
|
|
|
|
- // return $this->hasMany(Menu::class, 'parent_id');
|
|
|
|
|
- // }
|
|
|
|
|
-
|
|
|
|
|
- // public function parent()
|
|
|
|
|
- // {
|
|
|
|
|
- // return $this->belongsTo(Menu::class, 'parent_id');
|
|
|
|
|
- // }
|
|
|
|
|
}
|
|
}
|