/**
  * 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));
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }
Ejemplo n.º 3
0
 /**
  * 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']);
     }
 }