33 lines
526 B
PHP
33 lines
526 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Nominee extends Model
|
|
{
|
|
protected $table = 'nominee';
|
|
protected $fillable = [
|
|
|
|
'name',
|
|
'unit',
|
|
'no_anggota',
|
|
'position_id',
|
|
'partylist_id',
|
|
'election_id',
|
|
'experience',
|
|
'education',
|
|
'photo',
|
|
];
|
|
public $timestamp = false;
|
|
|
|
public function getPhotoAttribute($value)
|
|
{
|
|
if ($value) {
|
|
return base64_encode($value);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|