/** * Handle the command. * * @param ResponseFactory $response */ public function handle(ResponseFactory $response) { $table = $this->builder->getTable(); $options = $table->getOptions(); $data = $table->getData(); $table->setResponse($response->view($options->get('wrapper_view', $this->builder->isAjax() ? 'streams::ajax' : 'streams::blank'), $data)); }
/** * Handle the command. */ public function handle() { $table = $this->builder->getTable(); $options = $table->getOptions(); $data = $table->getData(); $content = view($options->get('table_view', $this->builder->isAjax() ? 'streams::table/ajax' : 'streams::table/table'), $data)->render(); $table->setContent($content); $table->addData('content', $content); }
/** * Default table views. * * @param TableBuilder $builder */ public function defaults(TableBuilder $builder) { if (!($stream = $builder->getTableStream())) { return; } if ($stream->isTrashable() && !$builder->getViews() && !$builder->isAjax()) { $builder->setViews(['all', 'trash']); } }