Merge pull request #1461 from AustinW/master
Minor corrections to the documentation and using Input::json() with Validator
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
If you are using the Auth class, you are strongly encouraged to hash and salt all passwords. Web development must be done responsibly. Salted, hashed passwords make a rainbow table attack against your user's passwords impractical.
|
If you are using the Auth class, you are strongly encouraged to hash and salt all passwords. Web development must be done responsibly. Salted, hashed passwords make a rainbow table attack against your user's passwords impractical.
|
||||||
|
|
||||||
Salting and hashing passwords is done using the **Hash** class. The Hash class is uses the **bcrypt** hashing algorithm. Check out this example:
|
Salting and hashing passwords is done using the **Hash** class. The Hash class uses the **bcrypt** hashing algorithm. Check out this example:
|
||||||
|
|
||||||
$password = Hash::make('secret');
|
$password = Hash::make('secret');
|
||||||
|
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ This routing convention may not be desirable for every situation, so you may als
|
|||||||
<a name="cli-route-testing"></a>
|
<a name="cli-route-testing"></a>
|
||||||
## CLI Route Testing
|
## CLI Route Testing
|
||||||
|
|
||||||
You may test your routes using Laravel's "Artisan" CLI. Simple specify the request method and URI you want to use. The route response will be var_dump'd back to the CLI.
|
You may test your routes using Laravel's "Artisan" CLI. Simply specify the request method and URI you want to use. The route response will be var_dump'd back to the CLI.
|
||||||
|
|
||||||
#### Calling a route via the Artisan CLI:
|
#### Calling a route via the Artisan CLI:
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class Validator {
|
|||||||
/**
|
/**
|
||||||
* Create a new validator instance.
|
* Create a new validator instance.
|
||||||
*
|
*
|
||||||
* @param array $attributes
|
* @param mixed $attributes
|
||||||
* @param array $rules
|
* @param array $rules
|
||||||
* @param array $messages
|
* @param array $messages
|
||||||
* @return void
|
* @return void
|
||||||
@@ -89,7 +89,7 @@ class Validator {
|
|||||||
|
|
||||||
$this->rules = $rules;
|
$this->rules = $rules;
|
||||||
$this->messages = $messages;
|
$this->messages = $messages;
|
||||||
$this->attributes = $attributes;
|
$this->attributes = (is_object($attributes)) ? get_object_vars($attributes) : $attributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user