Skip to content

shopavel/categories

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Categories package for Shopavel

Configuration

Facade

'aliases' => array(
    ...
    'Categories' => 'Shopavel\Categories\Facades\Categories',
);

Usage

Category

use Shopavel\Categories\Category;

$category = Category::find(1);

foreach ($category->products() as $product)
{
    // ...
}

Categories

You can use the facade to access the repository methods:

// Returns a products repository restricted to those within the category
Categories::products($category_id);

You can alter the query using methods from the product repository, and other default query builder methods:

Categories::products($category_id)->bestselling()->take(10);

License

All Shopavel packages are open-sourced software licensed under the MIT license

About

Categories package for Shopavel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages