Comments (7)
I think this is a good start: e9ae10b
Allows you to write like this:
public function columns() : array
{
return [
Column::make('Name')
->searchable()
->sortable(),
Column::make('Permissions', 'permissions_label')
->customAttribute()
->html()
->searchable(function($builder, $term) {
return $builder->orWhereHas('permissions', function($query) use($term) {
return $query->where('name', 'like', '%'.$term.'%');
});
}),
Column::make('Number of Users', 'users_count')
->sortable(),
Column::make('Actions')
->components([
Link::make('Edit')
->icon('fas fa-pencil-alt')
->class('btn btn-primary btn-sm')
->href(function($model) {
return route('admin.auth.role.edit', $model->id);
})
->hideIf(auth()->user()->cannot('access.roles.edit')),
Link::make('Delete')
->icon('fas fa-trash')
->class('btn btn-danger btn-sm')
->setAttribute('data-method', 'delete')
->href(function($model) {
return route('admin.auth.role.destroy', $model->id);
})
->hideIf(auth()->user()->cannot('access.roles.delete')),
], function($model) {
// Hide components for this row if..
return $model->id === config('access.roles.admin');
}),
];
}
from laravel-livewire-tables.
What would they actually do? Would need to build in the actual functionality to do those things? Or do you just want to generate default buttons and then the actions have to be implemented?
from laravel-livewire-tables.
yes, create the default buttons and the developer have to implement the actions
from laravel-livewire-tables.
Ok might be able to put something into there. Do you think they would just point to routes?
from laravel-livewire-tables.
yes an array with the actions and the routes
from laravel-livewire-tables.
Was this removed from the last version? Can´t find those components on the code
from laravel-livewire-tables.
Call to undefined method Rappasoft\LaravelLivewireTables\Views\Column::components() (View: /var/www/resources/views/invoices.blade.php)
looks Column has no components function, could you please help this?
Thanks
from laravel-livewire-tables.
Related Issues (20)
- [Bug]: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'user_id' in where clause is ambiguous HOT 1
- [Bug]: Multiple tables collapsible on mobile HOT 5
- [Bug]: reorder icon get displayed when sorting table HOT 2
- Dark mode only in the table HOT 1
- [Bug]: Page Refreshing before generating excel on bulk export HOT 2
- [Bug]: Items go missing when reordering HOT 2
- [Bug]: Search deosn't work when using mongodb HOT 1
- [Bug]: $this->paginationTotalItemCount included on all pagination types. Too heavy for "simple" HOT 4
- [Bug]: Column sorting is not working HOT 2
- [Bug]: Undefined property: stdClass::$id when using select all checkbox HOT 13
- [Bug]: Uncaught TypeError: node is null addScopeToNode livewire.js?id=239a5c52:1057 HOT 3
- [Bug]: Loss of Selections After Search HOT 1
- [Bug]: hideBulkActionsWhenEmpty is not working HOT 3
- [Bug]: Incorrect work filters and blade view Laravel 11, Livewire 3 HOT 4
- [Bug]: Relationship not working if we have multiple relationship with same table HOT 3
- [Feature Request]: Make data tables for Models not within app folder HOT 3
- ""
- [Feature Request]: Support for laravel nWidart module package HOT 3
- [Feature Request]: Hide Bulk actions dropdown HOT 1
- [Bug]: DateColumn throws error on NULL values when using date format HOT 4
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-livewire-tables.