New to Laravel php and trying to find out solution of this,
$periods = Period::where('timetable_id', $id);
echo $periods;
giving this error
Object of class Illuminate\Database\Eloquent\Builder could not be converted to string
i know why its giving this error but can not think of an alternate.