api code global jain
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Traits\ChaturmasDate\Relationships;
|
||||
|
||||
use App\Models\Chaturmas;
|
||||
use App\Models\ChaturmasReview;
|
||||
use App\Models\User;
|
||||
|
||||
/**
|
||||
* Trait ChaturmasRelationships
|
||||
* @package Domains\Chaturmas\Models\Traits\Relationships
|
||||
*/
|
||||
trait ChaturmasDateRelationships
|
||||
{
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function createdBy()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function updatedBy()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'updated_by');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function chaturmas()
|
||||
{
|
||||
return $this->hasMany(Chaturmas::class, 'chaturmas_date_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function reviews()
|
||||
{
|
||||
return $this->belongsTo(ChaturmasReview::class, 'chaturmas_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user