Add backend operation to use with MyKad reader feature
This commit is contained in:
+8
-2
@@ -3,6 +3,7 @@
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Daerah extends Model
|
||||
{
|
||||
@@ -14,7 +15,7 @@ class Daerah extends Model
|
||||
* @var array
|
||||
*/
|
||||
// protected $fillable = [
|
||||
|
||||
|
||||
// ];
|
||||
|
||||
/**
|
||||
@@ -23,4 +24,9 @@ class Daerah extends Model
|
||||
* @var array
|
||||
*/
|
||||
// protected $hidden = [];
|
||||
}
|
||||
|
||||
public function negeri(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Negeri::class, 'kodnegeri', 'kodnegeri');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user