Modified API and created its tests
This commit is contained in:
@@ -8,4 +8,17 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
class Siswa extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'nama', 'nisn', 'kelas', 'tempat_lahir', 'tanggal_lahir', 'lulus',
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'created_at', 'updated_at', 'deleted_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'tanggal_lahir' => 'datetime:Y-m-d',
|
||||
'lulus' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user