helen

Helen is a premium package, get your license here

On this page

Linkable models

Helen can associate a link with its related Eloquent model (morph). To enable the label and title helpers on your model, use the ShortLinks trait:

1use LaraZeus\Helen\Models\Concerns\ShortLinks;
2 
3class Post extends Model
4{
5 use ShortLinks;
6}

Note: The linkable relation is stored automatically when you use ShortUrlAction from a record.

The trait provides two methods you can override.

Label attribute

Attribute name used when displaying the related record (for example in tables):

1public static function getLabelKey(): string
2{
3 return 'name';
4}

Section title

Human-readable title for this linkable type in the UI:

1public static function getTitle(): string
2{
3 return 'Posts';
4}

Zeus is an open-source project. Thanks to my sponsors for helping me maintain this project.