Skip to content

Commit 3d487d4

Browse files
rtucekMarc Cámara
authored andcommitted
Simplify installation process (#436)
1 parent 09d3157 commit 3d487d4

File tree

1 file changed

+12
-24
lines changed

1 file changed

+12
-24
lines changed

README.md

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,36 +38,24 @@ Laravel 5 is released!!
3838

3939
## Installation
4040

41-
### Composer
41+
Install the package via composer: `composer require mcamara/laravel-localization`
4242

43-
Add Laravel Localization to your `composer.json` file.
44-
45-
"mcamara/laravel-localization": "1.2.*"
46-
47-
Run `composer install` to get the latest version of the package.
48-
49-
### Manually
50-
51-
It's recommended that you use Composer, however you can download and install from this repository.
52-
53-
### Laravel
54-
55-
Laravel Localization comes with a service provider for Laravel. You'll need to add it to your `composer.json` as mentioned in the above steps, then register the service provider with your application.
56-
57-
Open `config/app.php` and find the `providers` key. Add `LaravelLocalizationServiceProvider` to the array.
43+
Register the ServiceProvider in `config/app.php`
5844

5945
```php
60-
...
61-
Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider::class
62-
...
46+
'providers' => [
47+
// [...]
48+
Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider::class,
49+
],
6350
```
6451

65-
You can also add an alias to the list of class aliases in the same file.
52+
You may also register the `LaravelLocalization` Facade:
6653

6754
```php
68-
...
69-
'LaravelLocalization' => Mcamara\LaravelLocalization\Facades\LaravelLocalization::class
70-
...
55+
'aliases' => [
56+
// [...]
57+
'LaravelLocalization' => Mcamara\LaravelLocalization\Facades\LaravelLocalization::class,
58+
],
7159
```
7260

7361
## Usage
@@ -429,7 +417,7 @@ function() {
429417
Route::get(LaravelLocalization::transRoute('routes.about'), function() {
430418
return View::make('about');
431419
});
432-
420+
433421
Route::get(LaravelLocalization::transRoute('routes.view'), function($id) {
434422
return View::make('view',['id'=>$id]);
435423
});

0 commit comments

Comments
 (0)