2014-07-29 13:30:50 -05:00
|
|
|
<?php
|
|
|
|
|
2014-07-30 00:14:00 -05:00
|
|
|
use Firefly\Storage\Category\CategoryRepositoryInterface as CRI;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class CategoryController
|
|
|
|
*/
|
|
|
|
class CategoryController extends BaseController
|
2014-07-29 13:30:50 -05:00
|
|
|
{
|
2014-07-30 00:14:00 -05:00
|
|
|
protected $_repository;
|
|
|
|
|
|
|
|
public function __construct(CRI $repository)
|
|
|
|
{
|
|
|
|
$this->_repository = $repository;
|
|
|
|
View::share('menu', 'categories');
|
|
|
|
}
|
|
|
|
|
2014-07-29 13:30:50 -05:00
|
|
|
public function create()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-07-30 00:14:00 -05:00
|
|
|
public function delete(Category $category)
|
2014-07-29 13:30:50 -05:00
|
|
|
{
|
2014-07-30 00:14:00 -05:00
|
|
|
return View::make('categories.delete')->with('category',$category);
|
2014-07-29 13:30:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public function destroy()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-07-30 00:14:00 -05:00
|
|
|
public function edit(Category $category)
|
2014-07-29 13:30:50 -05:00
|
|
|
{
|
2014-07-30 00:14:00 -05:00
|
|
|
return View::make('categories.edit')->with('category',$category);
|
2014-07-29 13:30:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public function index()
|
|
|
|
{
|
2014-07-30 00:14:00 -05:00
|
|
|
$categories = $this->_repository->get();
|
|
|
|
return View::make('categories.index')->with('categories',$categories);
|
2014-07-29 13:30:50 -05:00
|
|
|
}
|
|
|
|
|
2014-07-30 00:14:00 -05:00
|
|
|
public function show(Category $category)
|
2014-07-29 13:30:50 -05:00
|
|
|
{
|
2014-07-30 00:14:00 -05:00
|
|
|
return View::make('categories.show')->with('category',$category);
|
2014-07-29 13:30:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public function store()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function update()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|