mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-14 18:44:31 +00:00
26 lines
376 B
PHP
26 lines
376 B
PHP
|
<?php
|
||
|
|
||
|
namespace App;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class Page extends Model
|
||
|
{
|
||
|
const SLUG_ROOT = [
|
||
|
'site',
|
||
|
'page'
|
||
|
];
|
||
|
|
||
|
protected $fillable = ['slug'];
|
||
|
|
||
|
public function url()
|
||
|
{
|
||
|
return url($this->slug);
|
||
|
}
|
||
|
|
||
|
public function editUrl()
|
||
|
{
|
||
|
return url("/i/admin/settings/pages/edit?page=".urlencode($this->slug));
|
||
|
}
|
||
|
}
|