{"id":21504420,"url":"https://github.com/dcasia/column-toggler","last_synced_at":"2025-04-05T02:09:46.918Z","repository":{"id":197452869,"uuid":"698677460","full_name":"dcasia/column-toggler","owner":"dcasia","description":"A Laravel Nova package that allows you to hide/show columns in the index view.","archived":false,"fork":false,"pushed_at":"2025-01-28T10:28:10.000Z","size":795,"stargazers_count":44,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T01:13:12.009Z","etag":null,"topics":["laravel","nova4"],"latest_commit_sha":null,"homepage":"","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcasia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"milewski","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-09-30T16:18:01.000Z","updated_at":"2025-02-10T19:51:53.000Z","dependencies_parsed_at":"2024-01-06T02:49:24.903Z","dependency_job_id":"984997be-79c5-486a-9782-d2cd4ed27c68","html_url":"https://github.com/dcasia/column-toggler","commit_stats":null,"previous_names":["dcasia/column-toggler"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fcolumn-toggler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fcolumn-toggler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fcolumn-toggler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fcolumn-toggler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcasia","download_url":"https://codeload.github.com/dcasia/column-toggler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276189,"owners_count":20912288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","nova4"],"created_at":"2024-11-23T18:59:49.251Z","updated_at":"2025-04-05T02:09:46.904Z","avatar_url":"https://github.com/dcasia.png","language":"Vue","funding_links":["https://github.com/sponsors/milewski"],"categories":[],"sub_categories":[],"readme":"# Column Toggler\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/digital-creative/column-toggler)](https://packagist.org/packages/digital-creative/column-toggler)\n[![Total Downloads](https://img.shields.io/packagist/dt/digital-creative/column-toggler)](https://packagist.org/packages/digital-creative/column-toggler)\n[![License](https://img.shields.io/packagist/l/digital-creative/column-toggler)](https://github.com/dcasia/column-toggler/blob/main/LICENSE)\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/dcasia/column-toggler/main/screenshots/dark.png\"\u003e\n  \u003cimg alt=\"Column Toggler in Action\" src=\"https://raw.githubusercontent.com/dcasia/column-toggler/main/screenshots/light.png\"\u003e\n\u003c/picture\u003e\n\nThis package provides the ability to toggle columns in the index view of any resource.\n\n# Installation\n\nYou can install the package via composer:\n\n```\ncomposer require digital-creative/column-toggler\n```\n\n## Basic Usage\n\nAdd the `DigitalCreative\\ColumnToggler\\ColumnTogglerTrait` to all your resources. The best way to do it is to add it directly to your `App\\Nova\\Resource` class.\n\n```php\nnamespace App\\Nova\\Resources;\n\nuse DigitalCreative\\ColumnToggler\\ColumnTogglerTrait;\nuse Laravel\\Nova\\Resource as NovaResource;\n\nabstract class Resource extends NovaResource\n{\n    use ColumnTogglerTrait;\n}\n```\n\nBy default, all columns will be selected/visible on the first page load, however you can define which should be hidden by calling `-\u003ehideByDefault()` on any nova field.\n\n```php\npublic function fieldsForIndex(NovaRequest $request): array\n{\n    return [\n        ID::make()-\u003esortable(),\n\n        Text::make('First Name', 'first_name')\n            -\u003esortable(),\n\n        Text::make('Last Name', 'last_name')\n            -\u003esortable(),\n\n        Text::make('Favorite Color', 'favorite_color')\n            -\u003esortable()\n            -\u003ehideByDefault(),\n\n        Boolean::make('Active', 'active')\n            -\u003ehideByDefault(),\n    ];\n}\n```\n\nDone, now a new icon will appear in the top right corner of any table resource.\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/dcasia/column-toggler/main/screenshots/bar-dark.png\"\u003e\n  \u003cimg alt=\"Column Toggler in Action\" src=\"https://raw.githubusercontent.com/dcasia/column-toggler/main/screenshots/bar-light.png\"\u003e\n\u003c/picture\u003e\n\n## Configuration\n\nYou can enable / disable column sorting by adding the following to your `config/nova.php` file:\n\n```php\n// config/nova.php\n\n'vendors' =\u003e [\n    'column_toggler' =\u003e [\n        'enable_sorting' =\u003e false,\n    ]\n]\n```\n\n## ⭐️ Show Your Support\n\nPlease give a ⭐️ if this project helped you!\n\n### Other Packages You Might Like\n\n- [Nova Dashboard](https://github.com/dcasia/nova-dashboard) - The missing dashboard for Laravel Nova!\n- [Nova Welcome Card](https://github.com/dcasia/nova-welcome-card) - A configurable version of the `Help card` that comes with Nova.\n- [Icon Action Toolbar](https://github.com/dcasia/icon-action-toolbar) - Replaces the default boring action menu with an inline row of icon-based actions.\n- [Expandable Table Row](https://github.com/dcasia/expandable-table-row) - Provides an easy way to append extra data to each row of your resource tables.\n- [Collapsible Resource Manager](https://github.com/dcasia/collapsible-resource-manager) - Provides an easy way to order and group your resources on the sidebar.\n- [Resource Navigation Tab](https://github.com/dcasia/resource-navigation-tab) - Organize your resource fields into tabs.\n- [Resource Navigation Link](https://github.com/dcasia/resource-navigation-link) - Create links to internal or external resources.\n- [Nova Mega Filter](https://github.com/dcasia/nova-mega-filter) - Display all your filters in a card instead of a tiny dropdown!\n- [Nova Pill Filter](https://github.com/dcasia/nova-pill-filter) - A Laravel Nova filter that renders into clickable pills.\n- [Nova Slider Filter](https://github.com/dcasia/nova-slider-filter) - A Laravel Nova filter for picking range between a min/max value.\n- [Nova Range Input Filter](https://github.com/dcasia/nova-range-input-filter) - A Laravel Nova range input filter.\n- [Nova FilePond](https://github.com/dcasia/nova-filepond) - A Nova field for uploading File, Image and Video using Filepond.\n- [Custom Relationship Field](https://github.com/dcasia/custom-relationship-field) - Emulate HasMany relationship without having a real relationship set between resources.\n- [Column Toggler](https://github.com/dcasia/column-toggler) - A Laravel Nova package that allows you to hide/show columns in the index view.\n- [Batch Edit Toolbar](https://github.com/dcasia/batch-edit-toolbar) - Allows you to update a single column of a resource all at once directly from the index page.\n\n## License\n\nThe MIT License (MIT). Please see [License File](https://raw.githubusercontent.com/dcasia/column-toggler/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcasia%2Fcolumn-toggler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcasia%2Fcolumn-toggler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcasia%2Fcolumn-toggler/lists"}