use Webfactor\Laravel\Backpack\InstantFields\InstantFields;
class EntityCrudController extends CrudController
{
use InstantFields;
public function setup()
{
// other Backpack options
$this->setAjaxEntity('entity');
// fields/columns definitions
}
}
$this->addInstantCreateButtonToList(
$entity, // foreign entity
$content, // content of the button
$entity_id, // the name of the ID of the current entity will be forwarded by this
$class, // optional, default: 'btn btn-xs btn-default', the css class of the button
$position, // optional, default: beginning, the position of the button in the line
$button_view // optional, you can override the used button blade by your own
);
// Example:
$this->addInstantCreateButtonToList(
'order',
'<i class="fa fa-cart-plus"></i>',
'task_id',
'btn btn-sm btn-info',
'end'
);
use Webfactor\Laravel\Backpack\InstantFields\InstantFields;
class EntityCrudController extends CrudController
{
use InstantFields;
public function setup()
{
// other Backpack options
$this->setAjaxEntity('entity');
$this->setAjaxStoreRequest(\RequestNamespace\StoreRequest::class);
$this->setAjaxUpdateRequest(\RequestNamespace\UpdateRequest::class);
// fields/columns definitions
}
}