im building API and im struggling with store data for multiple employee role, how to store , could you provide me some example, sorry for using foreign language.. Karyawan=employee, Jabatan=role
Karyawan.php
public function jabatan(){ return $this->hasMany('\App\Jabatan','id_jabatan'); }
Jabatan.php
public function karyawan(){ return $this->belongsTo('\App\Karyawan','id_jabatan'); }
how to KaryawanController at store function should be..
via Chebli Mohamed

Aucun commentaire:
Enregistrer un commentaire