Download the PHP package gueroverde/goutte without Composer
On this page you can find all versions of the php package gueroverde/goutte. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gueroverde/goutte
More information about gueroverde/goutte
Files in gueroverde/goutte
Package goutte
Short Description Laravel 5 package for Goutte, a simple PHP Web Scraper
License MIT
Homepage https://github.com/dweidner/laravel-goutte
Informations about the package goutte
Laravel 6 Facade for Goutte
This repository implements a simple ServiceProvider that makes a singleton instance of the Goutte client easily accessible via a Facade in Laravel 5. See @FriendsOfPHP/Goutte for more information about the PHP web scraper and its interfaces.
Installation using Composer
In your terminal application move to the root directory of your laravel project using the cd
command and require the project as a dependency using composer.
This will add the following lines to your composer.json
and download the project and its dependencies to your projects ./vendor
directory:
Usage
In order to use the static interface we first have to customize the application configuration to tell the system where it can find the new service. Open the file config/app.php
in the editor of your choice and add the following lines ([1]
, [2]
):
Now you should be able to use the facade within your application. Laravel will autoload the corresponding classes once you use the registered alias.
TIP: If you retrieve a "Class 'Goutte' not found"-Exception try to update the autoloader by running composer dump-autoload
in your project root.
Configuration
You can customize the default request options to apply to each request of the client. Copy the default configuration to your application directory first:
Open the created file in the config/goutte.php
and customize the configuration options to your liking.
Have a look into the Guzzle Documentation for a full list of available options.