Category "eloquent-relationship"

Putting brackets when calling methods from laravel model

My route looks like this: Route::get('/tags/post/{id}', function ($id){ $post = Post::find($id); foreach ($post->tags as $tag) { return

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

I just upgraded laravel 7 to laravel 8.30.1 and I am trying to add the default value of pivot column object_model of term_relationships table using the newly in