Skip to content

Commit c5e0b31

Browse files
committed
Fix markdown linter suggestions
Notably MD001, MD002, MD022, MD041 etc. For more details checkout out the following link: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md
1 parent 7a64dbd commit c5e0b31

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Laravel Package for TMDB API Wrapper
2+
23
[![License](https://poser.pugx.org/php-tmdb/laravel/license.png)](https://packagist.org/packages/php-tmdb/laravel)
34
[![Build Status](https://travis-ci.org/php-tmdb/laravel.svg)](https://travis-ci.org/php-tmdb/laravel)
45
[![Code Coverage](https://scrutinizer-ci.com/g/php-tmdb/laravel/badges/coverage.png)](https://scrutinizer-ci.com/g/php-tmdb/laravel/)
@@ -13,8 +14,8 @@ Both Laravel 5 and 4 are supported.
1314
[![Dependency Status](https://www.versioneye.com/php/php-tmdb:laravel/badge?style=flat)](https://www.versioneye.com/php/php-tmdb:laravel)
1415
[![Total Downloads](https://poser.pugx.org/php-tmdb/laravel/downloads.svg)](https://packagist.org/packages/php-tmdb/laravel)
1516

16-
1717
## Installation
18+
1819
Install Composer
1920

2021
```
@@ -35,6 +36,7 @@ composer require php-tmdb/laravel
3536
```
3637

3738
## Configuration
39+
3840
Add to your `app/config/app.php` (Laravel 4) or `config/app.php` (Laravel 5) the service provider:
3941

4042
```php
@@ -47,12 +49,14 @@ Add to your `app/config/app.php` (Laravel 4) or `config/app.php` (Laravel 5) the
4749

4850
Then publish the configuration file:
4951

50-
#### Laravel 4:
52+
### Laravel 4
53+
5154
```
5255
php artisan config:publish php-tmdb/laravel
5356
```
5457

55-
#### Laravel 5:
58+
### Laravel 5
59+
5660
```
5761
php artisan vendor:publish --provider="Tmdb\Laravel\TmdbServiceProviderLaravel5"
5862
```
@@ -62,11 +66,14 @@ Next you can modify the generated configuration file `tmdb.php` accordingly.
6266
That's all! Fire away!
6367

6468
## Usage
69+
6570
We can choose to either use the `Tmdb` Facade, or to use dependency injection.
6671

6772
### Facade example
73+
6874
The example below shows how you can use the `Tmdb` facade.
6975
If you don't want to keep adding the `use Tmdb\Laravel\Facades\Tmdb;` statement in your files, then you can also add the facade as an alias in `config/app.php` file.
76+
7077
```php
7178
use Tmdb\Laravel\Facades\Tmdb;
7279

@@ -81,6 +88,7 @@ class MoviesController {
8188
```
8289

8390
### Dependency injection example
91+
8492
```php
8593
use Tmdb\Repository\MovieRepository;
8694

@@ -102,8 +110,10 @@ class MoviesController {
102110
```
103111

104112
### Listening to events
113+
105114
We can easily listen to events that are dispatched using the Laravel event dispatcher that we're familiar with.
106115
The following example listens to any request that is made and logs a message.
116+
107117
```php
108118
use Log;
109119
use Event;
@@ -115,9 +125,11 @@ Event::listen(TmdbEvents::REQUEST, function(RequestEvent $event) {
115125
// do stuff with $event
116126
});
117127
```
128+
118129
In Laravel 5 instead of using the `Event` facade we could also have used the `EventServiceProvider` to register our event listener.
119130

120131
### Image helper
132+
121133
You can easily use the `ImageHelper` by using dependency injection. The following example shows how to show the poster image of the 20 most popular movies.
122134

123135
```php
@@ -155,8 +167,10 @@ class WelcomeController extends Controller {
155167

156168
}
157169
```
170+
158171
The `Configuration` used by the `Tmdb\Helper\ImageHelper` is automatically loaded by the IoC container.
159172
If you are a Laravel 5.1 user you could also use the blade's `@inject` functionality,
173+
160174
```
161175
@inject('image', 'Tmdb\Helper\ImageHelper')
162176
@@ -166,7 +180,9 @@ If you are a Laravel 5.1 user you could also use the blade's `@inject` functiona
166180
```
167181

168182
### Registering plugins
183+
169184
Plugins can be registered in a service provider using the `boot()` method.
185+
170186
```php
171187
namespace App\Providers;
172188

0 commit comments

Comments
 (0)