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