Skip to content

Instantly share code, notes, and snippets.

@ilyasozkurt
Created Sep 24, 2021
Embed
What would you like to do?
<?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