for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Translation\Models;
use Illuminate\Database\Eloquent\Model;
class Country extends Model
{
public $incrementing = false;
protected $casts = [
'code' => 'string',
];
protected $primaryKey = 'code';
protected $keyType = 'string';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'code'
protected $mappingProperties = array(
'name' => [
'type' => 'string',
"analyzer" => "standard",
],
'code' => [
);
* Each language may have several translations.
public function locales()
return $this->hasMany(Locale::class, 'country_code', 'code');
}