Initial Commit; base feats
This commit is contained in:
commit
9732135e90
137 changed files with 13856 additions and 0 deletions
21
app/Models/MovieGenre.php
Normal file
21
app/Models/MovieGenre.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MovieGenre extends Model
|
||||
{
|
||||
protected $table = 'genres';
|
||||
protected $primaryKey = 'genre_id';
|
||||
public $timestamps = false;
|
||||
protected $fillable = [
|
||||
'genre_name',
|
||||
];
|
||||
|
||||
public function movies()
|
||||
{
|
||||
return $this->belongsToMany(Movie::class, 'movie_genres', 'genre_id', 'movie_id');
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue