diff options
Diffstat (limited to 'app/Cocktail.php')
| -rw-r--r-- | app/Cocktail.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/Cocktail.php b/app/Cocktail.php new file mode 100644 index 0000000..31f40c1 --- /dev/null +++ b/app/Cocktail.php @@ -0,0 +1,21 @@ +<?php + +namespace App; + +use Illuminate\Database\Eloquent\Model; + +class Cocktail extends Model +{ + protected $table = "cocktail"; + protected $connection = 'mysql2'; + + protected $fillable = [ + "image_url", + "name" + ]; + + public function getIngredients() { + return $this->hasMany('App\Ingredient'); + } +} + |
