Download the PHP package vlados/laravel-blade-crawler-detect without Composer

On this page you can find all versions of the php package vlados/laravel-blade-crawler-detect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-blade-crawler-detect

Laravel Blade Crawler Detect

Latest Version on Packagist Total Downloads PHP Version Require

Two Blade directives that boost your Lighthouse and PageSpeed scores without changing a thing for real users.

Wrap your cookie banner, chat widget, analytics scripts, video embeds and other heavy chrome in @user ... @enduser. Bots like Googlebot, Lighthouse and PageSpeed will skip it entirely; humans see the same experience as before.

Result: lighter HTML for crawlers, better Core Web Vitals, more crawl budget spent on the content that actually matters — and zero JS or middleware changes.


Why developers reach for this

Install

That's it — the service provider auto-registers. No config file, no migrations, no env vars.

Requires PHP 8.1+ and Laravel 10, 11, 12 or 13.

The two directives

@user — render only for humans

Anything that hurts your audit score, is invisible to bots anyway, or just doesn't need to ship to crawlers.

@unlessuser — render only for crawlers

Server-render the SEO-friendly equivalent of something you ship as JS to humans.

Real-world wins

Wrap this in @user Why it helps
Cookie consent banner Removes ~200ms LCP delay on Lighthouse
Intercom / Drift / Zendesk widget Removes 100-300KB of third-party JS
Google Tag Manager / Analytics Removes blocking script + network round-trip
Optimizely / VWO / experimentation SDKs Removes render-blocking script
Hotjar / FullStory / session recording Removes 50-150KB of third-party JS
YouTube / Vimeo iframe embeds Removes a heavy iframe + its JS
Mapbox / Google Maps iframes Removes a heavy iframe + its tile fetches
Carousel / slider libraries Removes JS + CSS that crawlers don't render
Chat triggers, modal openers Removes interactive chrome bots can't click

What "crawler" means

Detection is delegated to jaybizzle/crawler-detect, a battle-tested PHP library that ships a regex covering thousands of bots — Googlebot, Bingbot, DuckDuckBot, AhrefsBot, SemrushBot, Applebot, and so on.

This package additionally treats these as crawlers, since they typically run as audits rather than real visits:

Want to add your own? You can swap or wrap the CrawlerDetect instance through Laravel's container.

Performance

The crawler regex is compiled once per process (so Octane workers compile it at boot, traditional FPM workers compile it on first hit). Each render only does:

  1. One substr to clamp the UA to 2KB.
  2. One preg_replace for exclusions.
  3. One preg_match against the compiled crawler pattern.

No DB queries, no cache lookups, no allocations beyond the strings above.

Octane / Swoole / RoadRunner

Safe by design. The user agent is read from the current request inside the directive's closure, so long-running workers always see the active request's UA — never a stale one cached at boot.

When NOT to use this

This package is a tool for hiding things crawlers don't need (heavy widgets, third-party scripts, modal chrome). It is not a tool for showing crawlers different content than you show users — that's cloaking under Google's spam policies and can earn a manual penalty. Use @unlessuser for SSR-equivalents of things you JS-render for humans, not for keyword stuffing.

Testing

Changelog

Please see CHANGELOG.

Contributing

Please see CONTRIBUTING.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-blade-crawler-detect with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
jaybizzle/crawler-detect Version ^1.2
spatie/laravel-package-tools Version ^1.14
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vlados/laravel-blade-crawler-detect contains the following files

Loading the files please wait ...