Skip to content

Installation

JackieDo edited this page Apr 9, 2020 · 2 revisions

Versions and compatibility.

Currently, there are two branches of Laravel Log Reader is compatible with the following version of Laravel framework:

Package version Laravel version
1.* 4.2
2.* 5.x or later

Note: Please note about the versioning of this package, which is very important as you proceed with installing the appropriate version for your application. This document will help you install this package on Laravel 5+.

Installation step by step.

You can install this package through Composer.

Step 1: Edit your composer.json file

Open your project's composer.json file and put following line to require section:

"jackiedo/log-reader": "2.*"
Step 2: Update your application

Run the composer update command in your command line interface:

composer update

Note: Instead of performing the above two steps, you can perform faster with the composer require jackiedo/log-reader:2.* command in your command line interface.

Step 3: Adding service provider.

Once update operation completes, the third step is add the service provider. Open the app configuration file (usually is config/app.php), and add a new line to the providers array:

...
'providers' => array(
    ...
    Jackiedo\LogReader\LogReaderServiceProvider::class,
),

Note: If you are using Laravel 5.5 or later, with the Package Discovery feature, you do not need to do this step

Step 4: Register the facade.

Also in above configuration file, add the follow line to the section aliases:

'LogReader' => Jackiedo\LogReader\Facades\LogReader::class,

Note: If you are using Laravel 5.5 or later, with the Package Discovery feature, you do not need to do this step

Step 5: Publishing package configuration file.

This step is optional, but you should do this to can configure the Log Reader configuration later.

Please run the artisan publish command compatible with your version of Laravel. For example, on Laravel 5+ will be:

php artisan vendor:publish --provider="Jackiedo\LogReader\LogReaderServiceProvider" --tag="config"

After that, you can set configuration for Laravel Log Reader with file config/log-reader.php