dev-think-one /
laravel-restricted-access
| 1 | <?php |
||
| 2 | |||
| 3 | namespace LinkRestrictedAccess\Models; |
||
| 4 | |||
| 5 | use Illuminate\Database\Eloquent\Relations\MorphMany; |
||
| 6 | |||
| 7 | trait HasRestrictedLink |
||
| 8 | { |
||
| 9 | 1 | public function restrictedLinks(): MorphMany |
|
| 10 | { |
||
| 11 | 1 | return $this->morphMany(\LinkRestrictedAccess\RestrictedAccess::restrictedLinkModel(), 'linkable'); |
|
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 12 | } |
||
| 13 | |||
| 14 | 1 | public function restrictedLink(RestrictedLink $restrictedLink): string |
|
| 15 | { |
||
| 16 | 1 | return url($restrictedLink->uuid); |
|
| 17 | } |
||
| 18 | } |
||
| 19 |