64robots / nova-row Goto Github PK
View Code? Open in Web Editor NEWRow Field for Laravel Nova
Row Field for Laravel Nova
Ability to pass a callback to Row
that receives the resource, a collection of rows and allows freedom to process via eloquent in scenarios where json is not the desired outcome.
public function fields()
{
return [
Row::make('Items', $this->itemFields())
->saving(function($order, $items) {
$items->each(function($item) use($order) {
$order->items()->save($item);
});
});
];
}
public function itemFields()
{
return [
Text::make('Product'),
Number::make('Quantity'),
Number::make('Price')
];
}
is it possible to have validation like at least one row is require or maximum 10 rows.
This package is great, and works really well with Nova Fields.
When you implement another package say FilemanagerField it would be nice if you could set a default width / toggle off labels so that the fields that you can't call methods on can still be aligned nicely.
To prevent something like the below:
Something like:
->defaultFieldClasses('w-full px-8 py-6')->defaultHideLabelInForms()
Ability to include a belongsTo relationship select, searchable, and have it result in a relation_id
format
not working with image
The new line when adding photos changes the photo in the first field
Would absolutely love this package if it didn't require the overriding of Nova's fields with 3rd party implementation. I really feel the style choices you made should just be baked in, there isn't much need for using the class methods then.
it always show [object Object],[object Object] so how should I persist the data in database. I have made price column with json field type.
Here is field detail.
Row::make('Price', [
Text::make('Currency')
->fieldClasses('w-full px-8 py-6')
->hideLabelInForms(),
Number::make('Amount')
->fieldClasses('w-full px-8 py-6')
->hideLabelInForms(),
])->fieldClasses('w-full px-8 py-6')
->labelClasses('w-1/2 px-8 py-6'),
Now when i submit post in database it is stored as [object Object] etc..
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.