first commit
This commit is contained in:
27
app/Models/Syarikat.php
Normal file
27
app/Models/Syarikat.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Syarikat extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'jenis_perniagaan',
|
||||
'nossm',
|
||||
'alamat',
|
||||
'notelefon',
|
||||
'bil_cawangan',
|
||||
'tarikh_luput'
|
||||
];
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'user_syarikats', 'syarikat_id', 'user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user