Modified API and created its tests

This commit is contained in:
Gregorio Chiko Putra
2019-05-09 15:44:27 +07:00
parent b0553839d0
commit a82b6f0af5
7 changed files with 154 additions and 5 deletions

View File

@@ -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',
];
}