| 
									
										
										
										
											2021-06-26 23:23:15 +08:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace BookStack\Actions; | 
					
						
							| 
									
										
										
										
											2021-05-16 07:29:56 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | use BookStack\Model; | 
					
						
							|  |  |  | use Illuminate\Database\Eloquent\Relations\MorphTo; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Favourite extends Model | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     protected $fillable = ['user_id']; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get the related model that can be favourited. | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function favouritable(): MorphTo | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return $this->morphTo(); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |