dev-master
9999999-devA Laravel 5 service provider for including the Atlas library.
MIT
The Requires
- php >=5.5.9
The Development Requires
by Five Squared
laravel laravel 5
Wallogit.com
2017 © Pedro Peláez
A Laravel 5 service provider for including the Atlas library.
A Laravel service provider for the Atlas library, (*1)
composer require fivesqrd/atlas-laravel, (*2)
Composer will automaticall register the provider and facade. If not:, (*3)
In config/app.php register the Atlas Service Provider in the "providers" array:, (*4)
'providers' => array(
// ...
Atlas\Laravel\ServiceProvider::class,
)
In config/app.php add the Atlas facade under "aliases":, (*5)
'aliases' => array(
// ...
'Atlas' => Atlas\Laravel\AtlasFacade::class,
)
The config should be automatically created from the composer install. If not, run php artisan vendor:publish, (*6)
Atlas uses 'DB_DATABASE', 'DB_USERNAME' and 'DB_PASSWORD' values defined in the .env config file., (*7)
Atlas facade is now available can be instantiated throughout the application like this:, (*8)
\Atlas::model(App\Model\User::class) ->isActive(true) ->query() ->fetch()->all();
$user = \Atlas::model(App\Model\User::class)->fetch(1);
\Atlas::save($user);
\Atlas::relation($user)->tickets()->fetch()->all();
More usage examples for the Atlas API are avilable on the Atlas repo: http://github.com/Five-Squared/Atlas, (*9)
A Laravel 5 service provider for including the Atlas library.
MIT
laravel laravel 5