MedicOneSystems / MedicOneSystems/livewire-datatables

Dynamic table name

Open
#325 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

Hi, maybe I am doing something wrong but is any solution to use a model with dynamic table name? I use a scope
public function scopeFromTable($query, $tableName)
{
$query->from($tableName);
}
in my model but it won't work with this

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue mentions a model scope named scopeFromTable that calls from($tableName), but it names no repository files or tests. Start by reproducing the reported failure with a model using that scope and trace how table names are handled; done means the supported behavior and its expected constraints are documented or implemented with a reproducible test.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.