Skip to content

Dynamic model table  #189

Closed
Closed
@jetmirhaxhisefa

Description

@jetmirhaxhisefa

I have a "Post" model which has a dynamic table name for example: "post_pages", "post_article" etc. So there is no default table name.

The problem is when the cache is stored it has no table name indicator in the cache key. So I can't load different caches for each table by using the same Model.

Example usage:
$articles = (new Post())->setTable("post_articles")->get();
// $pages returns the above article data because its stored previusly in cache
$pages = (new Post())->setTable("post_pages")->get();

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions