Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh authored Feb 10, 2022
1 parent ea5b2e1 commit 1870c5c
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,7 @@ composer require rcrowe/twigbridge

# Quick Start

Once Composer has installed or updated your packages you need to register TwigBridge with Laravel itself. Open up config/app.php and find the providers key, towards the end of the file, and add 'TwigBridge\ServiceProvider', to the end:

```php
'providers' => [
...
TwigBridge\ServiceProvider::class,
],
```

Now find the aliases key, again towards the end of the file, and add 'Twig' => 'TwigBridge\Facade\Twig', to have easier access to the TwigBridge (or Twig\Environment):

```php
'aliases' => [
...
'Twig' => TwigBridge\Facade\Twig::class,
],
```

Now that you have both of those lines added to config/app.php we will use Artisan to add the new twig config file:
Laravel automatically registers the Service Provider. Use Artisan to publish the twig config file:

```php
php artisan vendor:publish --provider="TwigBridge\ServiceProvider"
Expand Down

0 comments on commit 1870c5c

Please sign in to comment.