I am starting to really dip my feet into laravel and have some incorrect behavior and I am unsure how to trouble shoot it.
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Podcast;
use App\Models\Tag;
class Episode extends Model
{
use HasFactory;
public function podcast(){
return $this->belongsTo(Podcast::class);
}
public function tags(){
return $this->hasMany(Tag::class);
}
}
When I run in Tinker
and get an episode collection and then run the podcast method I get this
I thought I would get the podcast collection. There is no error just an out put of the relationship. I assume I am doing something wrong but not wrong enough to create an error. Any help is appreciated.