mega-commit: migrations, controllers, models, etc.
This commit is contained in:
		
							parent
							
								
									9732135e90
								
							
						
					
					
						commit
						2c6745e812
					
				
					 70 changed files with 2124 additions and 400 deletions
				
			
		|  | @ -24,9 +24,14 @@ class Movie extends Model | |||
|         'updated_at', | ||||
|     ]; | ||||
| 
 | ||||
|     public static function findOrfail($id) | ||||
|     { | ||||
|         return Movie::where('movie_id', $id)->firstOrFail(); | ||||
|     } | ||||
| 
 | ||||
|     public function genre() | ||||
|     { | ||||
|         return $this->belongsTo(MovieGenre::class, 'genre_id', 'genre_id'); | ||||
|         return $this->belongsTo(Genre::class, 'genre_id', 'genre_id'); | ||||
|     } | ||||
| 
 | ||||
|     public function showings() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue