millerphp / laravel-browserless
This is my package laravel-browserless
Fund package maintenance!
MillerPHP
Installs: 52
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 4
Forks: 1
Open Issues: 1
pkg:composer/millerphp/laravel-browserless
Requires
- php: ^8.2
- guzzlehttp/psr7: ^2.0
- illuminate/contracts: ^10.0||^11.0||^12.0
- php-http/client-common: ^2.0
- php-http/discovery: ^1.0
- psr/http-client: ^1.0
- psr/http-client-implementation: *
- psr/http-factory-implementation: *
- psr/http-message: ^1.0|^2.0
- ratchet/pawl: ^0.4.1
- spatie/laravel-package-tools: ^1.16
- textalk/websocket: ^1.5
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
README
A powerful Laravel package for interacting with the Browserless API, providing an elegant way to take screenshots, generate PDFs, analyze performance, and automate browser tasks.
Installation
- Install the package via Composer:
composer require millerphp/laravel-browserless
- Publish the configuration file:
php artisan vendor:publish --provider="MillerPHP\LaravelBrowserless\BrowserlessServiceProvider"
- Configure your environment variables in
.env
:
BROWSERLESS_API_KEY=your_api_key BROWSERLESS_API_URL=https://chrome.browserless.io
Quick Start
Take a screenshot:
use MillerPHP\LaravelBrowserless\Facades\Browserless; $screenshot = Browserless::screenshot() ->url('https://example.com') ->send();
Generate a PDF:
$pdf = Browserless::pdf() ->url('https://example.com') ->send();
Analyze performance:
$performance = Browserless::performance() ->url('https://example.com') ->send(); $score = $performance->categoryScore('performance');
Documentation
- Installation Guide - Detailed installation and setup instructions
- Usage Guide - Basic usage examples and common features
- API Reference - Comprehensive API documentation
- Configuration - Configuration options and environment variables
- Advanced Usage - Advanced features and customization
- Testing - Testing your Browserless integrations
- Troubleshooting - Common issues and solutions
- Security - Security best practices
- Performance - Performance optimization guide
Features
- Screenshots: Capture full-page or element-specific screenshots
- PDF Generation: Convert web pages to PDFs with custom options
- Performance Analysis: Analyze website performance using Lighthouse
- Browser Automation: Execute complex browser tasks using BQL
- Custom Options: Fine-tune every aspect of your requests
- Error Handling: Comprehensive error handling and logging
- Testing Support: Built-in testing utilities and mocking
- Security: Secure configuration and API key management
- Performance: Caching, batch processing, and resource optimization
Requirements
- PHP 8.1 or higher
- Laravel 9.0 or higher
- Composer
License
This package is open-sourced software licensed under the MIT license.