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
Laravel Snip

Laravel Snip Laravel Package

rudolfbruder/laravel-snip

Laravel Snip is a lightweight package for creating and managing reusable snippets in Laravel applications. It provides a simple API and Blade-friendly rendering so you can store, organize, and reuse content with minimal setup. Quick to install and easy to extend.

View on GitHub
Deep Wiki
Context7

A dd()-style snipping tool for Laravel — capture values during a request and view them on-page in an admin-only panel.

Frequently asked questions about Laravel Snip
How do I install laravel-snip in a Laravel app?
Install the package via Composer, publish its migration and any config or assets your setup uses, then run php artisan migrate. Provider auto-discovery means you normally do not need to register the service provider manually. After publishing, you can create snippets through the Eloquent model and render them with the Blade component.
What Laravel and PHP versions does laravel-snip support?
The provided package overview does not list exact Laravel or PHP version constraints, so check the package composer.json and release notes before installing. The package is described as lightweight with zero extra dependencies and provider auto-discovery, but that does not guarantee support for every Laravel version. Validate it against your application's Composer constraints, especially on older or pre-release Laravel versions.
How do I render a snippet in a Blade view with laravel-snip?
Use the package's Blade component to render a stored snippet in any view. The component lets you drop snippets into documentation pages, internal wikis, or dashboards without manually querying the model or duplicating markup. Check the component's documented props for selecting the snippet and enabling optional syntax highlighting or the copy button.
Can I enable syntax highlighting and copy-to-clipboard for snippets?
Yes, laravel-snip includes optional syntax highlighting and a copy-to-clipboard button for rendered snippets. These features are optional, so you can keep rendering plain code blocks if you do not need them. Review the published package configuration to control whether these enhancements are enabled.
How does caching work in laravel-snip?
laravel-snip supports configurable caching, which can help avoid repeated database work when snippets appear on documentation or dashboard pages. The package configuration controls the caching behavior, so tune it to how often your snippet content changes. If snippets are edited frequently, use a shorter cache lifetime or clear the cache when content is updated.
Can I control snippet ordering and public/private visibility?
Yes, laravel-snip provides configurable ordering and public/private visibility for snippets. That lets you organize snippets for your team while keeping internal or draft content out of public views. For stricter access control, add your own Laravel authorization policies rather than relying only on the public/private flag.
Is laravel-snip suitable for production documentation or internal wikis?
It can fit documentation sites, internal wikis, and developer dashboards because snippets are stored in your Laravel database and rendered through a Blade component. Treat the public/private visibility setting as a content flag, not a complete authorization system, and add policies for sensitive internal content. In production, also review caching, database backups, and who can create or edit snippets.
Does laravel-snip require extra services or dependencies?
No, the package is described as having zero extra dependencies and uses Laravel's existing Eloquent model, migration, Blade, and configuration systems. Snippets live in your application's database alongside your existing data. Based on the provided overview, you do not need a separate snippet service, storage backend, or external API.
How should I test laravel-snip in my Laravel application?
Test the publish and migrate flow in a fresh local database, then create public and private snippets and render them through the Blade component. Cover ordering, caching, syntax highlighting, and copy-button behavior if you enable those options. Also run your normal Laravel test suite to confirm the package's model and component do not conflict with your app's views or routes.
How do I maintain and upgrade laravel-snip safely?
Treat it as a pre-1.0 package and review release notes before upgrading, since configuration or Blade component behavior may change. Back up your snippets table, update via Composer in a branch, and re-run publish or migrate steps only as the upgrade guide requires. Test rendering, caching, and visibility in staging before deploying to production.
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.
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
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect