-
Notifications
You must be signed in to change notification settings - Fork 0
Extending Builders
Thorazine edited this page Aug 11, 2017
·
3 revisions
Builders are easy to add and extend. This is because they are loaded from a config file in your config folder.
If you go to config/cms/builders
you will find a list of all available builders Hack uses. You can add your own there or change the namespace to point it to your own while extending the current one. The extend should at least have a constructor with parent call like so:
<?php
namespace App\Models\Builders;
use Thorazine\Hack\Models\Builders\Carousel as BaseCarousel;
class Carousel extends BaseCarousel
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->child = $this;
}
}