tethys/app/Models/GeolocationBox.php
Arno Kaimbacher 8ea540a88c - laravel framework upgrade frpm 7.x to 8. see also: https://laravel.com/docs/8.x/upgrade#assert-exact-json-method
- use  PHP7 null coalesce operator instead of laravel optional method
- change Breadcrumbs::register method to Bredcrumbs::for method
- composer updates
2022-08-10 11:18:10 +02:00

28 lines
596 B
PHP

<?php
namespace App\Models;
use App\Models\Dataset;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class GeolocationBox extends Model
{
use HasFactory;
protected $table = 'geolocation_box';
public $timestamps = false;
protected $fillable = ['xmin', 'xmax', 'ymin', 'ymax'];
protected $casts = [
'xmin' => 'float',
'xmax' => 'float',
'ymin' => 'float',
'ymax' => 'float',
];
public function dataset()
{
return $this->belongsTo(Dataset::class, 'dataset_id', 'id');
}
}