| 
									
										
										
										
											2015-07-14 04:52:56 +08:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-11 02:31:09 +08:00
										 |  |  | namespace BookStack; | 
					
						
							| 
									
										
										
										
											2015-07-14 04:52:56 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-16 21:51:45 +08:00
										 |  |  | class Image extends Entity | 
					
						
							| 
									
										
										
										
											2015-07-14 04:52:56 +08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2015-08-16 07:18:22 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     protected $fillable = ['name']; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-15 05:34:31 +08:00
										 |  |  |     public function getFilePath() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return storage_path() . $this->url; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-08-09 04:28:50 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-05 00:50:52 +08:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Get the url for this item. | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function getUrl() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return public_path() . $this->url; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-07-14 04:52:56 +08:00
										 |  |  | } |