seem i got the solution without change table name
if u have bookmarks table name
public function products() {
return $this->belongsToMany(Product::class, 'bookmarks');
}
It seems Laravel is trying to use category_posts table (because of many-to-many relationship). But you don't have this table, because you've created category_post table. Change name of the table to category_posts.
Ur answer absolutly right Famous Frog, but for case like favorites table or whithlisttable has many to many, how to solve those?