summaryrefslogtreecommitdiff
path: root/app/Ingredient.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Ingredient.php')
-rw-r--r--app/Ingredient.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/Ingredient.php b/app/Ingredient.php
new file mode 100644
index 0000000..67ef6ad
--- /dev/null
+++ b/app/Ingredient.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Ingredient extends Model
+{
+ protected $table = "ingredient";
+ protected $connection = 'mysql2';
+ protected $fillable = [
+ 'cocktail_id',
+ 'name',
+ ];
+
+ public function getCocktail() {
+ $this->belongsTo('App\Cocktail');
+ }
+}