Package Data | |
---|---|
Maintainer Username: | thujohn |
Maintainer Contact: | jonathan.thuau@gmail.com (thujohn) |
Package Create Date: | 2013-07-02 |
Package Last Update: | 2013-10-24 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:25:28 |
Package Statistics | |
---|---|
Total Downloads: | 66 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 6 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Packagist API for Laravel 4
Add thujohn/packagist
to composer.json
.
"thujohn/packagist": "dev-master"
Run composer update
to pull down the latest version of Packagist.
Now open up app/config/app.php
and add the service provider to your providers
array.
'providers' => array(
'Thujohn\Packagist\PackagistServiceProvider',
)
Now add the alias.
'aliases' => array(
'Packagist' => 'Thujohn\Packagist\PackagistFacade',
)
Search a package The second parameter enable/disable the pagination
Route::get('/', function()
{
return Packagist::search(array('q' => 'laravel'), false);
});
Get a package
Route::get('/', function()
{
return Packagist::package('thujohn/packagist');
});
Get all packages
Route::get('/', function()
{
return Packagist::packages();
});