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.
		
		
		
		
		
			
		
			
	
	
		
			39 lines
		
	
	
		
			591 B
		
	
	
	
		
			PHTML
		
	
		
		
			
		
	
	
			39 lines
		
	
	
		
			591 B
		
	
	
	
		
			PHTML
		
	
| 
								 
											7 years ago
										 
									 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace App;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								use Illuminate\Database\Eloquent\Model;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class Circle extends Model
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    protected $fillable = [
							 | 
						||
| 
								 | 
							
								    	'name',
							 | 
						||
| 
								 | 
							
								    	'description',
							 | 
						||
| 
								 | 
							
								    	'bcc',
							 | 
						||
| 
								 | 
							
								    	'scope',
							 | 
						||
| 
								 | 
							
								    	'active'
							 | 
						||
| 
								 | 
							
								    ];
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public function members()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								    	return $this->hasManyThrough(
							 | 
						||
| 
								 | 
							
								    		Profile::class,
							 | 
						||
| 
								 | 
							
								    		CircleProfile::class,
							 | 
						||
| 
								 | 
							
								    		'circle_id',
							 | 
						||
| 
								 | 
							
								    		'id',
							 | 
						||
| 
								 | 
							
								    		'id',
							 | 
						||
| 
								 | 
							
								    		'profile_id'
							 | 
						||
| 
								 | 
							
								    	);
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public function owner()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								    	return $this->belongsTo(Profile::class, 'profile_id');
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public function url()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        return url("/i/circle/show/{$this->id}");
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |