From 046d9d44e59f552a7be60aefa5c86b255b6d5312 Mon Sep 17 00:00:00 2001 From: Luke <13789719+lukeramsden@users.noreply.github.com> Date: Tue, 10 Apr 2018 12:21:23 +0100 Subject: [PATCH] Add mention of autodiscovery to README (#7) Closes #4. --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a5a82b8..f3cb070 100644 --- a/README.md +++ b/README.md @@ -3,29 +3,32 @@ Simple toast messages for Laravel 5. ## Installation -1. Run `composer require grimthorr/laravel-toast` to include this in your project. -2. Add `'Grimthorr\LaravelToast\ServiceProvider'` to `providers` in `config/app.php`. +**1.** Run `composer require grimthorr/laravel-toast` to include this in your project. + +**2.** *Optional, Laravel 5.4 and below*: Add `'Grimthorr\LaravelToast\ServiceProvider'` to `providers` in `config/app.php`, and add `'Toast' => 'Grimthorr\LaravelToast\Facade'` to `aliases` in `config/app.php`. ```php + // config/app.php 'providers' => array( // ... 'Grimthorr\LaravelToast\ServiceProvider', ), - ``` - -3. Add `'Toast' => 'Grimthorr\LaravelToast\Facade'` to `aliases` in `config/app.php`. - - ```php + // ... 'aliases' => array( // ... 'Toast' => 'Grimthorr\LaravelToast\Facade', ), ``` + +**3.** Include `@include('toast::messages')` or `@include('toast::messages-jquery')` somewhere in your template. + +**4.** *Optional*: Run `php artisan vendor:publish --provider="Grimthorr\LaravelToast\ServiceProvider" --tag="config"` to publish the config file. + +**5.** *Optional*: Modify the published configuration file located at `config/laravel-toast.php` to your liking. + +**6.** *Optional*: Run `php artisan vendor:publish --provider="Grimthorr\LaravelToast\ServiceProvider" --tag="views"` to publish the views. -4. *Optional*: Run `php artisan vendor:publish --provider="Grimthorr\LaravelToast\ServiceProvider" --tag="config"` to publish the config file. -5. *Optional*: Modify the published configuration file located at `config/laravel-toast.php` to your liking. -6. *Optional*: Run `php artisan vendor:publish --provider="Grimthorr\LaravelToast\ServiceProvider" --tag="views"` to publish the views. -7. *Optional*: Modify the published views located at `resources/views/vendor/toast` to your liking. +**7.** *Optional*: Modify the published views located at `resources/views/vendor/toast` to your liking. ## Configuration