first initial
This commit is contained in:
25
app/Models/Dealer.php
Normal file
25
app/Models/Dealer.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Dealer extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
protected $fillable = [
|
||||
'dealer_code', 'name', 'address', 'pic'
|
||||
];
|
||||
|
||||
/**
|
||||
* Get all of the transactions for the Dealer
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function transactions()
|
||||
{
|
||||
return $this->hasMany(Transaction::class, 'dealer_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user