Skip to content

Instantly share code, notes, and snippets.

@ilyasozkurt
Created September 24, 2021 08:34
Show Gist options
  • Save ilyasozkurt/69627448faabe5e4e825b099aca74aa4 to your computer and use it in GitHub Desktop.
Save ilyasozkurt/69627448faabe5e4e825b099aca74aa4 to your computer and use it in GitHub Desktop.
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Earthquake extends Model
{
use HasFactory;
//Link model with table
protected $table = 'earthquakes';
//Define fillable fields for model
protected $fillable = [
'latitude',
'longitude',
'depth',
'md',
'ml',
'mw',
'region',
'happened_at',
'hash',
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment