Comments (6)
updated
hi, basically not for "all" fields and not for all kind of "relation", but can be done (for some).
see below
from rapyd-laravel.
it already works on belongsTo relations because internally it works on foreingKey:
see "Author" autocomplete: http://www.rapyd.com/rapyd-demo/filter
It filter by author_id, but using author.fullname as fieldname where:
"author" is the relation
"fullname" is a simple accessor (look one demo models)
to know how autocomplete works, if it's not intuitive, look on http://www.rapyd.com/rapyd-demo/advancedform
from rapyd-laravel.
ok now it should work also for:
hasOne, hasMany, belongsToMany
from rapyd-laravel.
thxs! looks great! (changed to dev-master now)
got the filter and autocomplete now! :-)
but how to save realted fields? $edit->add('contact.lastname','name', 'text'); ?
it gives me the 'id' of the related row (like 'contact.id') and i'm able to change it, but i'd like to change for example 'lastname'.
how to do that?
from rapyd-laravel.
I'm working on that, but basically for now to store values:
- it looks at relation-type first (so "contact."),
- if relation is a "belongsTo" it try to store the foreign key value, ".field" is used only as display value
- if relation is a "belongsToMany" it works on pivot table retrieving / storing associations, again ".field" is used only as display value
- I plan to support "hasOne" too asap. (in this case it will store "lastname" value on contact table)
these samples are on demo / datafilter adv
from rapyd-laravel.
ok I close this issue because:
- datafilter now can handle HasOne, HasMany, BelongsTo, BelongsToMany
- field supported: text (HasOne, HasMany), select, radiogroup, autocomplete (BelongsTo), tags (BelongsToMany)
It's not all tested but feel free to open a new issue (but be specific: field-type relation-type).
Note: it works only for first level relationship. (you can't use 'relation.anotherrelation.field')
from rapyd-laravel.
Related Issues (20)
- Delete an uploaded Image/(File) HOT 3
- Package not compatible with Neo4j
- Can image field save and get with s3 storage? HOT 1
- Alternative of glyphicon of Laravel 5.6 with bootstrap 4 HOT 1
- Access full dataset from remote autocomplete for filling more fields onchange HOT 1
- Can I use another icon set instead of glyphicon without modify the vendor package?
- Conditional Form Validation
- File Field - Call to undefined method Illuminate\Events\Dispatcher::fire() on Laravel 5.8 HOT 2
- live saerch in zofe raypad/laravel
- PHP 7.3 breaks composer with continue/targeting error
- Increase intervention version
- Laravel 6.0 Support HOT 3
- Did this package support laravel 5.5 ? HOT 2
- How to show continuous serial number in naygest grid
- Is there a support for laravel 7.3 ??? Im updating my app from 5.5 HOT 1
- Order grid by relation HOT 1
- SSL on Docs site appears to be expired HOT 1
- Support for Laravel 8? HOT 1
- rapyd as standard livewire component library?
- rapyd::rapyd.save doesn't work in laravel 8
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 rapyd-laravel.