2021-06-26 11:23:15 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace BookStack\Interfaces;
|
2021-03-08 17:34:22 -05:00
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
|
|
|
|
|
|
/**
|
2021-06-26 11:23:15 -04:00
|
|
|
* Interface Sluggable.
|
2021-03-08 17:34:22 -05:00
|
|
|
*
|
|
|
|
* Assigned to models that can have slugs.
|
|
|
|
* Must have the below properties.
|
|
|
|
*
|
2021-06-26 11:23:15 -04:00
|
|
|
* @property int $id
|
2021-03-08 17:34:22 -05:00
|
|
|
* @property string $name
|
2021-06-26 11:23:15 -04:00
|
|
|
*
|
2021-03-08 17:34:22 -05:00
|
|
|
* @method Builder newQuery
|
|
|
|
*/
|
|
|
|
interface Sluggable
|
|
|
|
{
|
2021-03-09 18:06:12 -05:00
|
|
|
/**
|
|
|
|
* Regenerate the slug for this model.
|
|
|
|
*/
|
|
|
|
public function refreshSlug(): string;
|
2021-06-26 11:23:15 -04:00
|
|
|
}
|