Comments (10)
looks like the twig syntax
from rapyd-laravel.
Also check this out: http://symfony.com/doc/current/components/expression_language/introduction.html (php >= 5.5.3, no dependencies)
(though I'm not sure it supports piping filters like in your examples above)
from rapyd-laravel.
looks really interesting, especially the way you can define/create expressions http://symfony.com/doc/current/components/expression_language/extending.html
however I have little time available.. so I think I'll start from a simple method that fit my needs
then we can do something better
from rapyd-laravel.
just throw Twig back in. Twig is your friend.
from rapyd-laravel.
I love twig, but.. then:
- I must rearrange dg to support twig instread blade,
- then I need to find a way to let users define custom filters/functions
- then we should rewrite widgets views (just to uniform syntax)
- then if we use twig bridge.. how to share configuration bw application ... package..
from rapyd-laravel.
this should be done https://github.com/zofe/rapyd-laravel/blob/master/src/Zofe/Rapyd/DataGrid/Cell.php#L38
$grid->add('author.name', 'Body')->filter('strip_tags|substr[0,20]');
from rapyd-laravel.
is the blade syntax still supported?
from rapyd-laravel.
absolutely yes, I just added a simple method (similar to "rule" syntax of validator) and probably I'll also add the closure .
I need just to find a convention to support php functions where input-value is not the first .. and to support also static classes.
from rapyd-laravel.
also done
$grid->add('body|strip_tags|substr[0,20]','Body');
from rapyd-laravel.
also done cell closure.. so now DataGrid support:
$grid->add('body', 'Body')->filter('strip_tags|substr[0,20]'); //filters
$grid->add('body|strip_tags|substr[0,20]','Body'); //inline filters
$grid->add('ucfirst(substr( {{ $body }}, 0,100))', 'Body'); //inline blade
//and closure on value
$grid->add('body', 'Body')->cell( function ($value) {
return substr(strip_tags($value), 0, 20);
});
I close this for now.. I think is enough
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.