Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit 2b2989c

Browse files
committed
Fixing namespace in the docs as well. closes #286
1 parent 028044d commit 2b2989c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ following configuration in your project's boot/startup file (changing the proper
4141
to your database, obviously):
4242

4343
```php
44-
\LaravelBook\Ardent\Ardent::configureAsExternal(array(
44+
\LaravelArdent\Ardent\Ardent::configureAsExternal(array(
4545
'driver' => 'mysql',
4646
'host' => 'localhost',
4747
'port' => 3306,
@@ -138,7 +138,7 @@ For example, user registration or blog post submission is a common coding requir
138138
To create a new Ardent model, simply make your model class derive from the `Ardent` base class. In the next examples we will use the complete namespaced class to make examples cleaner, but you're encouraged to make use of `use` in all your classes:
139139

140140
```php
141-
use LaravelBook\Ardent\Ardent;
141+
use LaravelArdent\Ardent\Ardent;
142142

143143
class User extends Ardent {}
144144
```
@@ -151,7 +151,7 @@ class User extends Ardent {}
151151
Ardent models use Laravel's built-in [Validator class](http://laravel.com/docs/validation). Defining validation rules for a model is simple and is typically done in your model class as a static variable:
152152

153153
```php
154-
class User extends \LaravelBook\Ardent\Ardent {
154+
class User extends \LaravelArdent\Ardent\Ardent {
155155
public static $rules = array(
156156
'name' => 'required|between:3,80|alpha_dash',
157157
'email' => 'required|between:5,64|email|unique:users',
@@ -211,7 +211,7 @@ An array that is **not empty** will override the rules or custom error messages
211211
Just like the Laravel Validator, Ardent lets you set custom error messages using the [same syntax](http://laravel.com/docs/validation#custom-error-messages).
212212

213213
```php
214-
class User extends \LaravelBook\Ardent\Ardent {
214+
class User extends \LaravelArdent\Ardent\Ardent {
215215
public static $customMessages = array(
216216
'required' => 'The :attribute field is required.',
217217
...
@@ -242,7 +242,7 @@ Here's the complete list of available hooks:
242242
For example, you may use `beforeSave` to hash a users password:
243243

244244
```php
245-
class User extends \LaravelBook\Ardent\Ardent {
245+
class User extends \LaravelArdent\Ardent\Ardent {
246246
public function beforeSave() {
247247
// if there's a new password, hash it
248248
if($this->isDirty('password')) {
@@ -281,7 +281,7 @@ Have you ever written an Eloquent model with a bunch of relations, just to notic
281281
In Ardent you can cleanly define your relationships in an array with their information, and they will work just like if you had defined them in methods. Here's an example:
282282

283283
```php
284-
class User extends \LaravelBook\Ardent\Ardent {
284+
class User extends \LaravelArdent\Ardent\Ardent {
285285
public static $relationsData = array(
286286
'address' => array(self::HAS_ONE, 'Address'),
287287
'orders' => array(self::HAS_MANY, 'Order'),
@@ -342,7 +342,7 @@ It follows the same [mass assignment rules](http://laravel.com/docs/eloquent#mas
342342
To enable the auto-hydration feature, simply set the `$autoHydrateEntityFromInput` instance variable to `true` in your model class. However, to prevent filling pre-existent properties, if you want auto-hydration also for update scenarios, you should use instead `$forceEntityHydrationFromInput`:
343343

344344
```php
345-
class User extends \LaravelBook\Ardent\Ardent {
345+
class User extends \LaravelArdent\Ardent\Ardent {
346346
public $autoHydrateEntityFromInput = true; // hydrates on new entries' validation
347347
public $forceEntityHydrationFromInput = true; // hydrates whenever validation is called
348348
}
@@ -356,7 +356,7 @@ Ardent models can *auto-magically* purge redundant input data (such as *password
356356
To enable this feature, simply set the `$autoPurgeRedundantAttributes` instance variable to `true` in your model class:
357357

358358
```php
359-
class User extends \LaravelBook\Ardent\Ardent {
359+
class User extends \LaravelArdent\Ardent\Ardent {
360360
public $autoPurgeRedundantAttributes = true;
361361
}
362362
```
@@ -382,7 +382,7 @@ Suppose you have an attribute named `password` in your model class, but don't wa
382382
To do that, add the attribute name to the `Ardent::$passwordAttributes` static array variable in your model class, and set the `$autoHashPasswordAttributes` instance variable to `true`:
383383

384384
```php
385-
class User extends \LaravelBook\Ardent\Ardent {
385+
class User extends \LaravelArdent\Ardent\Ardent {
386386
public static $passwordAttributes = array('password');
387387
public $autoHashPasswordAttributes = true;
388388
}

0 commit comments

Comments
 (0)