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

Commit

Permalink
Adding doc about usage of Ardent outside of Laravel
Browse files Browse the repository at this point in the history
The feature was finalized in commit ff41aae, but never documented.
This addition closes #60.
  • Loading branch information
igorsantos07 committed Jul 20, 2013
1 parent e8e33eb commit 29f9ad1
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Based on the Aware bundle for Laravel 3 by Colby Rabideau.

Copyright (C) 2013 Max Ehsan <[http://laravelbook.com/](http://laravelbook.com/)>

##Installation
## Installation

Add `laravelbook/ardent` as a requirement to `composer.json`:

Expand All @@ -20,6 +20,25 @@ Add `laravelbook/ardent` as a requirement to `composer.json`:

Update your packages with `composer update` or install with `composer install`.

### Usage outside of Laravel (since [ff41aae](https://github.com/laravelbook/ardent/commit/ff41aae645e38f21c0b5b9ee542a66ecc25f06a0))

If you're willing to use Ardent as a standalone ORM package you're invited to do so by using the
following configuration line in your project's boot/startup file (changing the properties according
to your database, obviously):

```php
\LaravelBook\Ardent\Ardent::configureAsExternal(array(
'driver' => 'mysql',
'host' => 'localhost',
'port' => 3306,
'database' => 'my_system',
'username' => 'myself',
'password' => 'h4ckr',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci'
));
```

## Documentation

* [Introduction](#intro)
Expand Down Expand Up @@ -319,4 +338,4 @@ class User extends Ardent {
}
```

Ardent will automatically replace the plain-text password attribute with secure hash checksum and save it to database. It uses the Laravel `Hash::make()` method internally to generate hash.
Ardent will automatically replace the plain-text password attribute with secure hash checksum and save it to database. It uses the Laravel `Hash::make()` method internally to generate hash.

0 comments on commit 29f9ad1

Please sign in to comment.