Comments (3)
maybe the best solution is to add counter :
categories
categories_2
categories_3
//...
$posts = Post::joinRelations('firstCategories')
->join('secondCategories')
->orderBy('firstCategories.id', 'desc');
from laravel-eloquent-join.
It would be like solution 2, adding a counter before the sha1 is generated in case of use hash, I will check in which part of the code would be the best place to do it, but if you already know, please guide me with a line number or function name :)
from laravel-eloquent-join.
If you say that we should have two tables in our app, I do not see it as a good practice, because it would be necessary to have duplicated information, since countries
and countries_2
would be the same.
I think that better will be to resolve it in the package code.
from laravel-eloquent-join.
Related Issues (20)
- wrong attribute value HOT 3
- Join multiple relationships by calling the joinRelations method once HOT 4
- Class `DB` not found HOT 2
- LoadCount not support HOT 1
- supports laravel 8? HOT 1
- OrderByJoin for BelongsTo relationships breaks in laravel 5.5 HOT 1
- Optional Group by
- Blockchain/E-currency software
- Count without first calling ->get() always returns 1
- Laravel 9, all test fail, not sure how to fix those errors but i have updated the dependencies to illuminati 9 and run your tests this is the result.
- Laravel 9 HOT 5
- Support laravel 10 HOT 1
- Aggregate parameters are not escaped HOT 2
- Syntax error or access violation: 1055 '...' isn't in GROUP BY HOT 1
- Error when applying sort by join on MSSQL DB HOT 3
- Column not found: 1054 Unknown column 'sort' in 'order clause'
- Question: Why is this not the default in Eloquent? HOT 2
- Question: Eager loading HOT 5
- Laravel 7.x - Cannot install HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-eloquent-join.