Skip to content

Commit

Permalink
Fix broken Markdown headings (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryant1410 authored and hootlex committed Apr 18, 2017
1 parent 690b51c commit caa3741
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ A simple Moderation System for Laravel 5.* that allows you to Approve or Reject

Keep your application pure by preventing offensive, irrelevant, or insulting content.

##Possible Use Case
## Possible Use Case

1. User creates a resource (a post, a comment or any Eloquent Model).
2. The resource is pending and invisible in website (ex. `Post::all()` returns only approved posts).
Expand All @@ -15,7 +15,7 @@ Keep your application pure by preventing offensive, irrelevant, or insulting con

4. You application is clean.

##Installation
## Installation

First, install the package through Composer.

Expand Down Expand Up @@ -91,10 +91,10 @@ class AddModerationColumnsToPostsTable extends Migration

**You are ready to go!**

##Usage
## Usage
> **Note:** In next examples I will use Post model to demonstrate how the query builder works. You can Moderate any Eloquent Model, even User.
###Moderate Models
### Moderate Models
You can moderate a model Instance:
```php
$post->markApproved();
Expand Down Expand Up @@ -124,10 +124,10 @@ Post::where('title', 'Horse')->reject();
Post::where('title', 'Horse')->postpone();
```

###Query Models
### Query Models
By default only Approved models will be returned on queries. To change this behavior check the [configuration](#configuration).

#####To query the Approved Posts, run your queries as always.
##### To query the Approved Posts, run your queries as always.
```php
//it will return all Approved Posts (strict mode)
Post::all();
Expand All @@ -139,7 +139,7 @@ Post::approved()->get();
Post::where('title', 'Horse')->get();

```
#####Query pending or rejected models.
##### Query pending or rejected models.
```php
//it will return all Pending Posts
Post::pending()->get();
Expand All @@ -159,7 +159,7 @@ Post::withRejected()->get();
//it will return Approved and Postponed Posts
Post::withPostponed()->get();
```
#####Query ALL models
##### Query ALL models
```php
//it will return all Posts
Post::withAnyStatus()->get();
Expand All @@ -168,7 +168,7 @@ Post::withAnyStatus()->get();
Post::withAnyStatus()->where('title', 'Horse')->get();
```

###Model Status
### Model Status
To check the status of a model there are 3 helper methods which return a boolean value.
```php
//check if a model is pending
Expand All @@ -184,12 +184,12 @@ $post->isRejected();
$post->isPostponed();
```

##Strict Moderation
## Strict Moderation
Strict Moderation means that only Approved resource will be queried. To query Pending resources along with Approved you have to disable Strict Moderation. See how you can do this in the [configuration](#configuration).

##Configuration
## Configuration

###Global Configuration
### Global Configuration
To configuration Moderation package globally you have to edit `config/moderation.php`.
Inside `moderation.php` you can configure the following:

Expand All @@ -198,7 +198,7 @@ Inside `moderation.php` you can configure the following:
2. `moderated_by_column` represents the default column 'moderated_by' in the database.
3. `strict` represents [*Strict Moderation*](#strict-moderation).

###Model Configuration
### Model Configuration
Inside your Model you can define some variables to overwrite **Global Settings**.

To overwrite `status` column define:
Expand Down

0 comments on commit caa3741

Please # to comment.