for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Webpatser\Uuid\Uuid;
class User_nationality extends Base_Model {
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'user_nationalities';
* Attributes that should be mass-assignable.
* @var array
protected $fillable = ['nationality_id', 'security_user_id', 'comments', 'preferred', 'modified_user_id', 'modified', 'created_user_id', 'created'];
* The attributes excluded from the model's JSON form.
protected $hidden = [];
* The attributes that should be casted to native types.
protected $casts = [];
* The attributes that should be mutated to dates.
protected $dates = ['modified', 'created'];
public static function boot()
{
parent::boot();
self::creating(function ($model) {
$model->id = (string) Uuid::generate(4);
});
}