mirror of https://github.com/pixelfed/pixelfed
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			26 lines
		
	
	
		
			376 B
		
	
	
	
		
			PHTML
		
	
		
		
			
		
	
	
			26 lines
		
	
	
		
			376 B
		
	
	
	
		
			PHTML
		
	
| 
								 
											7 years ago
										 
									 | 
							
								<?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));
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |