Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Inline Boolean

Inline Boolean Laravel Package

smart145/inline-boolean

A lightweight Laravel package for inline boolean toggles: flip true/false attributes right from list tables and admin views, with a single click and no full form submission. Easy to wire into Blade or Livewire and simple to customize.

View on GitHub
Deep Wiki
Context7

smart145/inline-boolean is a lightweight Laravel package for toggling boolean attributes directly from your UI—no full page reloads or extra controllers required. It turns checkboxes, badges, or table cells into interactive inline switches, making it easy to enable or disable flags like active, published, or verified with a single click.

  • One-line Blade directive to render a toggle
  • Built-in route and controller for handling AJAX updates
  • Configurable model, column, and labels
  • Works with Bootstrap, Tailwind, and vanilla HTML
  • Includes authorization hooks and validation
Frequently asked questions about Inline Boolean
How do I install smart145/inline-boolean in a Laravel app?
Install it with composer require smart145/inline-boolean, then check the package source for any publishable assets or views. Before running the command, verify its Composer constraints against your PHP and Laravel versions, because constraints from the package's era can hard-fail resolution on PHP 8.2 or newer. Also confirm first whether your install path is a Blade directive or a Nova field, since those are two different integration stories.
Does smart145/inline-boolean support Laravel 10 or Laravel 11?
The public description implies broad Laravel support, but the deeper technical notes point at a Nova 3-era stack of Laravel 6 through 8 and PHP 7.2 through 8.0, shipped with a compiled Vue 2 bundle. On Laravel 10 or 11 with Nova 4 or 5, which use Vue 3 and Vite, that bundle will likely fail to register, often silently. Try it in a throwaway app first, and avoid using --ignore-platform-reqs as a workaround, since a wrong constraint usually implies a wrong bundle.
Is smart145/inline-boolean a Blade directive or a Laravel Nova field?
That is the first thing to resolve, because the description and the technical notes disagree. The public overview advertises a one-line Blade directive with a package route and controller for AJAX updates, while the deeper notes describe a Nova field class extending Laravel\Nova\Fields\Boolean with a prebuilt Vue bundle in dist. Read the source to see which one actually exists before planning your integration. If you are not on Nova, the field-class path is irrelevant and the Blade framing needs verification.
Does the inline toggle respect Laravel authorization policies?
This must be confirmed before anything else ships. If the toggle posts to a package-defined route instead of Nova's policy-checked field-update endpoint, the write may skip authorizedToUpdate entirely. A list-view control that writes without policy enforcement is a permissions hole, not a UX feature. Inspect the controller or field code and add your own policy gate if one is missing.
Can I configure the model, column, and toggle labels?
The description says the model, column, and labels are configurable, which in a Nova field path would be constructor arguments and in a Blade path would be directive parameters. Check the source for how the model is resolved before trusting it with multi-model admin screens. Whatever the mechanism, resolve the model and column server-side from a whitelist rather than accepting them from the request payload.
Does it work with Tailwind CSS and Bootstrap?
The description claims support for Bootstrap, Tailwind, and vanilla HTML, so the rendered markup should be styleable in either framework. If your install actually uses the prebuilt Vue bundle, you would instead be overriding Nova field components, which is a different styling exercise. Verify which rendering path your installed version uses before writing CSS.
What happens if the AJAX toggle request fails?
Failure handling is not confirmed in the available material, and that matters more than it sounds. An optimistic toggle that does not visibly roll back on a 403 or 422 leaves the user believing a change saved when it did not, which is worse than a broken button for moderation or account-suspension flags. Test the error paths explicitly and confirm the next index load shows the server value.
Can I use smart145/inline-boolean without Laravel Nova?
Only if a Blade component genuinely exists in the source, which the description claims but the technical notes do not corroborate. The safest route for a plain Blade admin is a small in-house component plus a policy-checked POST route, which is around thirty lines of code and yours to maintain. Treat the package as a reference implementation for the interaction pattern in that case.
What are the alternatives for inline boolean editing in Laravel?
If you are on Nova 4 or 5, check whether inline boolean editing is already supported natively, because that closes the ticket. Outside Nova, a small custom Blade component or a Livewire toggle gives the same one-click UX with your own authorization, validation, and events. The package itself is best evaluated as a reference implementation whose pattern you replicate.
Is smart145/inline-boolean still maintained and safe for production?
Expect to own it: there is no service provider, no config file, no migration, and no extension surface beyond subclassing, and the compiled bundle dates to 2020. Practical advice is to vendor the source into your own package directory and set a re-review trigger on your next Nova major upgrade. Remember that the inline path has no validation, no events, no concurrency handling, and no audit trail, so add those yourself for any flag that matters.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core