MINI Sh3ll
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Enquiry extends Model
{
use SoftDeletes;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'created_by', 'plant_id', 'company_id', 'contact_name', 'email', 'mobile', 'country_id', 'product_type', 'site_locator', 'date_code', 'serial_number', 'issue_type', 'description', 'updated_by'
];
public function company(){
return $this->belongsTo('App\Models\Company');
}
public function country(){
return $this->belongsTo('App\Models\Country');
}
public function enquiry_assignes()
{
return $this->hasMany('App\Models\EnquiryAssigned', 'enquiry_id', 'id');
}
public function enquiry_remarks()
{
return $this->hasMany('App\Models\EnquiryAssigned', 'enquiry_id', 'id');
}
public function plant(){
return $this->belongsTo('App\Models\Plant');
}
}
OHA YOOOO