Example #1
0
<?php

use Enpowi\App;
use Enpowi\Modules\Module;
Module::is();
$publishers = ETM\Publisher::searchByName(App::param('query'));
$names = [];
foreach ($publishers as $publisher) {
    $names[] = $publisher->name;
}
echo json_encode($names);
Example #2
0
<?php

use Enpowi\Modules\Module;
use Enpowi\Modules\DataOut;
Module::is();
$data = (new DataOut())->add('publishers', ETM\Publisher::all())->add('action', '')->out();
?>
<form
    data="<?php 
echo $data;
?>
"
    class="container"
    action="publisher/list_service"
    data-done="publisher/list"
    v-module>
  <table class="table">
    <thead>
    <tr>
      <th></th>
      <th v-t>Name</th>
      <th v-t>Commands</th>
    </tr>
    </thead>
    <tbody>
    <tr v-repeat=" publisher : publishers ">
      <td>
        <input type="checkbox" name="publishers[]" value="{{ publisher.name }}">
        <input
            type="radio"
            name="publisher"