2020-01-07 19:45:45 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
2020-01-19 14:02:14 +01:00
|
|
|
use App\Models\Recipe;
|
2020-01-07 19:45:45 +01:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class UsersRecipes extends Model
|
|
|
|
{
|
2020-01-08 10:43:17 +01:00
|
|
|
protected $fillable = ['user_id', 'recipe_id'];
|
2020-01-08 10:46:21 +01:00
|
|
|
|
2020-01-19 14:02:14 +01:00
|
|
|
protected $with = ['recipe'];
|
|
|
|
|
2020-01-08 10:46:21 +01:00
|
|
|
public function setUpdatedAtAttribute($value) {}
|
2020-01-19 14:02:14 +01:00
|
|
|
|
|
|
|
public function recipe()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Recipe::class);
|
|
|
|
}
|
2020-01-07 19:45:45 +01:00
|
|
|
}
|