mirror of https://github.com/kcal-app/kcal.git
17 lines
376 B
PHP
17 lines
376 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
|
|
|
abstract class JournalableModel extends Model
|
|
{
|
|
/**
|
|
* Get all of the journal entries for the recipe.
|
|
*/
|
|
public function journalEntries(): MorphToMany {
|
|
return $this->morphToMany(JournalEntry::class, 'journalable');
|
|
}
|
|
}
|