| Total Complexity | 5 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class Partner extends Model |
||
| 14 | { |
||
| 15 | use CrudTrait; |
||
|
|
|||
| 16 | use HasFactory; |
||
| 17 | |||
| 18 | protected $guarded = ['id']; |
||
| 19 | |||
| 20 | public function courses() |
||
| 21 | { |
||
| 22 | return $this->hasMany(Course::class); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getFormattedStartDateAttribute() |
||
| 26 | { |
||
| 27 | if (! $this->started_on) { |
||
| 28 | return '-'; |
||
| 29 | } |
||
| 30 | |||
| 31 | return Carbon::parse($this->started_on)->locale(app()->getLocale())->isoFormat('Do MMM YYYY'); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getFormattedEndDateAttribute() |
||
| 41 | } |
||
| 42 | } |
||
| 43 |