FEATURE: add pipeline for saving also into prague-tennis-camp template

This commit is contained in:
Michal Kváček
2017-03-10 09:52:31 +01:00
parent 9bec808d38
commit 0e2aecb529
3 changed files with 39 additions and 36 deletions
@@ -0,0 +1,23 @@
<?php
namespace Templates\PragueTennisCamp\Pipeline;
use App\CMS\Contracts\Content\DisplayPipeline\Process;
use App\Models\Content\Content;
use Modules\Categories\Entities\Category;
class AddTraineeTeamCategory implements Process {
/**
* Process and modify given page
*
* @param Content $page
*
* @return mixed
*/
function handle(Content & $page)
{
$category = Category::where('url', 'trenersky-tym')
->first();
$page->traineeTeamCategory = $category;
}
}