vsent/laravel-table-configurations
@tableConfig) for declarative column definitions, reducing boilerplate in views.table_configurations table) or cached, offering flexibility for different deployment strategies.TableConfigurationLoaded, TableConfigurationSaved) for hooks into the lifecycle (e.g., logging, validation, or syncing with external systems).@if checks).table_configurations table with columns: table_name, columns (JSON), user_id (if user-specific).TableConfiguration model or extend it.@foreach($posts as $post)) with @tableConfig('posts').@tableConfig('posts', [
'columns' => [
'id' => ['visible' => true],
'title' => ['visible' => true, 'sortable' => true],
'published_at' => ['visible' => false], // Hidden by default
],
])
App\Services\TableConfigService).Cache::remember) to reduce database hits for configurations.Column class to add custom logic (e.g., HtmlColumn, RelationshipColumn).TableConfigurationLoaded) for pre/post-processing.composer require vsent/laravel-table-configurations.php artisan vendor:publish --provider="Vsent\TableConfigurations\TableConfigurationsServiceProvider".@tableConfig.logs table or custom logging.TableConfigurationLoaded).Cache::remember("table_config_{$tableName}", now()->addHours(1), function() use ($tableName) {
return TableConfiguration::where('table_name', $tableName)->first();
});
N+1 queries. Use Eloquent’s with() or Laravel Query Builder optimizations.How can I help you explore Laravel packages today?