imanghafoori1 / eloquent-relativity Goto Github PK
View Code? Open in Web Editor NEWAllows you to decouple your eloquent models from one another.
License: MIT License
Allows you to decouple your eloquent models from one another.
License: MIT License
Hi, great package!
Is there any chance to make this package trait free?
hi Mr. Ghafouri
i install this package in my project , but does not work Because i use l5-repository package
when
php artisan serve
get error when i use DynamicRelations in PostRepository :
Call to undefined method Prettus\Repository\Eloquent\BaseRepository::__call()
get error when i use DynamicRelations in BaseRepository:
Cannot access parent:: when current class scope has no parent
Is it possible to guide me about this? (tnx)
Hi, this is a simple suggestion, but why the methods are not following the standard PSR-1?
Method names MUST be declared in camelCase.
I understand that there are already methods called like morphMany
, so this is, i guess, the reason why you choose to use morph_many
, but wouldn't fell more natural and readable to use methods like
attachMorphMany
or addMorphMany
or dynamicMorphMany
?
Hi, currently to map all relationships added i'm using this:
use Illuminate\Support\Collection;
use ReflectionClass;
use App\Models\Foo;
$model = Foo::class;
$class = new ReflectionClass($model);
$property = $class->getProperty('dynamicRelations');
$property->setAccessible(true);
$methods = array_keys($property->getValue('dynamicRelations'));
Is there a way to do this without reflection?
Maybe adding an interface and a public method getDynamicRelations()
Thanks
Thank you for this, and your other packages. They are quite helpful for decoupling. Will this be updated to L8? It's basic dependency updates, really I'm curious if this package is maintained anymore.
Thanks for the great work. Much appreciated.
What should be the best approach to attach relationships based on a condition of the given entity if the class is the same?
For example:
detail
to all entities Book
that have an attribute type=foo
friends
to entity BasicEntity
that have table value cats
I'm asking this because i have one single Model
that in each instance may have different table
values because these models are defined in the database and there is only one class.
Can i make a PR about this or should i simple create an addon/extension?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.