for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
namespace DoeSangue\Models;
use Illuminate\Database\Eloquent\Model;
class Donor extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'donors';
* The attributes that are mass assignable.
* @var array
protected $filliable = [
'blood_type_id',
'bio',
];
* The primary key for the model.
protected $primaryKey = 'user_id';
* Indicates if the IDs are auto-incrementing.
* @var bool
public $incrementing = false;
* Related
* @return \Illuminate\Database\Eloquent\Relations\HasOne
public function user()
return $this->hasOne(User::class, 'id', 'user_id');
}
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
public function bloodType()
return $this->belongsTo(BloodType::class, 'blood_type_id');