Implement version table, update APIs when getting version info from github because the tags API was not retrieving our current git tags
This commit is contained in:
@@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Site extends Model
|
||||
{
|
||||
const UPDATED_AT = NULL;
|
||||
|
||||
protected $fillable = ['ip_address'];
|
||||
|
||||
/* RELATIONS */
|
||||
|
@@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SiteVersion extends Model
|
||||
{
|
||||
const UPDATED_AT = NULL;
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
public function sites()
|
||||
@@ -14,6 +16,11 @@ class SiteVersion extends Model
|
||||
return $this->belongsTo(Site::class);
|
||||
}
|
||||
|
||||
public function versions()
|
||||
{
|
||||
return $this->belongsTo(Version::class);
|
||||
}
|
||||
|
||||
/* ATTRIBUTES */
|
||||
public function getDateAttribute(): int
|
||||
{
|
||||
|
12
app/Models/Version.php
Normal file
12
app/Models/Version.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Version extends Model
|
||||
{
|
||||
const UPDATED_AT = NULL;
|
||||
|
||||
protected $fillable = ['version'];
|
||||
}
|
Reference in New Issue
Block a user