except() public static method

Get all of the input except for a specified array of items.
public static except ( array | mixed $keys ) : array
$keys array | mixed
return array
Example #1
0
 /**
  * Method fired after the Save action is complete.
  * 
  * @return
  */
 protected function afterSave()
 {
     $this->brokenAfterSave = false;
     foreach (\Request::except('_token') as $key => $value) {
         // Could swap this out for model -> getAttribute, then check if we have an attribute or a relation... getRelationValue() is helpful
         if (method_exists($this->model, $key) && is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\\Database\\Eloquent\\Relations\\Relation')) {
             $this->saveRelation('afterSave', $key, $value);
         }
     }
 }
Example #2
0
 public function save()
 {
     $settings = \Request::except('_token');
     $final = [];
     foreach ($settings as $settingsName => $settingsValue) {
         $split = explode('_', $settingsName);
         $final[$split[0]][$split[1]] = $settingsValue;
     }
     file_put_contents(storage_path('jsnap/config.json'), json_encode($final));
     return redirect('/settings');
 }
 public function store(Request $request)
 {
     $data = $request->all();
     $rules = array('email' => 'required|email|unique:users,email', 'password' => 'required', 'names' => 'required', 'surnames' => 'required', 'cedula' => 'required|integer|unique:users,cedula', 'id_university' => 'required|not_in:Universidad', 'id_carrera' => 'required|not_in:Carrera', 'rol' => 'required|in:Estudiante,Profesor,Admin');
     $validacion = \Validator::make($data, $rules);
     if ($validacion->fails()) {
         return redirect()->back()->withErrors($validacion->errors())->withInput(\Request::except('password'));
     }
     $user = new User($data);
     $user->save();
     $pivoteusercarrera = new Pivoteusercarrera($data);
     $pivoteusercarrera->save();
     $mensaje = "El usuario " . $user->names . " " . $user->surnames . " fue guardado correctamente";
     \Session::flash('mensaje', $mensaje);
     return redirect()->route('administrador.create');
 }
Example #4
0
 /**
  * Add new player.
  *
  * @return Response
  */
 public function add()
 {
     $rules = array('nick' => 'required|unique:players,nick|min:4|max:30|alpha_dash', 'fname' => 'alpha_dash', 'lname' => 'alpha_dash', 'password' => 'required|alpha_dash|min:4|confirmed');
     $validator = \Validator::make(\Input::all(), $rules);
     if ($validator->fails()) {
         return redirect('/player/add')->withInput(\Request::except('password'))->withErrors($validator);
     }
     $player = new Player();
     $player->nick = \Input::get('nick');
     $player->fname = \Input::get('fname');
     $player->lname = \Input::get('lname');
     $player->gender = \Input::get('gender');
     $player->group = 2;
     $player->password = \Hash::make(\Input::get('password'));
     $player->birth = \Input::get('birth');
     $player->save();
     //\Auth::loginUsingId($player->id);
     return \Redirect::route('players');
 }
Example #5
0
<div class="content_sec">
	<!-- Column2 Section -->
    <div class="col2">
    	<div class="col2_top">&nbsp;</div>
        <div class="col2_center">
    	<h4 class="heading colr">Featured Products</h4>
        <div class="small_banner">
        	<a href="#"><img src="{{URL::asset('images/small_banner.gif')}}" alt="" /></a>
        </div>
        <div class="sorting">
        	<p class="left colr">{{$new_products->total()}} Item(s)</p>
            <ul class="right">
                <li>
                    <input type="text" data-max="{{$new_products->total()}}" id="per-page" placeholder=" items / page" size="10">
                    <?php 
$new_products->appends(Request::except('perpage'));
?>
                    <a id="go" class="colr" href="javascript::void(null)" data-link="{!! url($new_products->url($new_products->currentPage())) !!}">Go</a>
                </li>
                <?php 
$new_products->appends(Request::all());
?>
                <li class="text">Page
                    @if ($new_products->currentPage() > 1)
                        <a href="{!!url($new_products->url(1))!!}" class="colr">First</a> 
                    @endif
                    @if ($new_products->currentPage() > 1)
                        <a href="{!!$new_products->previousPageUrl()!!}" title="Previous" class="colr">&laquo;</a> 
                    @endif
                    @for($i=0, $j=-2; $i<5 && $new_products->currentPage() + $j <= $new_products->lastPage(); $j++)
                        @if($new_products->currentPage() + $j > 0)
Example #6
0
 /**
  * Build current url string, without return param.
  *
  * @return string
  */
 function current_url()
 {
     if (!Request::has('return')) {
         return Request::fullUrl();
     }
     return sprintf('%s?%s', Request::url(), http_build_query(Request::except('return')));
 }
 public function postSettings()
 {
     $fields = ['theme.fixed_layout' => 'checkbox', 'theme.boxed_layout' => 'checkbox', 'theme.sidebar_mini' => 'checkbox', 'theme.toggle_sidebar' => 'checkbox', 'theme.sidebar_on_hover' => 'checkbox'];
     foreach ($fields as $key => $value) {
         if (!\Request::has($key)) {
             \Request::merge([$key => false]);
         } else {
             \Request::merge([$key => true]);
         }
     }
     $settings = \Request::except('_token');
     //dd($settings);
     foreach ($settings as $key => $value) {
         \SoaUserSetting::set($key, $value);
     }
     \SoaUserSetting::save();
     flash()->success(trans('admin::lang.save.edit'));
     return redirect()->back();
 }
 public function getList()
 {
     // All Jobs
     $job_list = ClassJob::get_name_abbr_list();
     view()->share('job_list', $job_list);
     $include_quests = TRUE;
     if (!\Request::all()) {
         return redirect()->back();
     }
     // Get Options
     $options = explode(':', array_keys(\Request::except('_token'))[0]);
     // Parse Options              						// Defaults
     $desired_job = isset($options[0]) ? $options[0] : 'CRP';
     $start = isset($options[1]) ? $options[1] : 1;
     $end = isset($options[2]) ? $options[2] : 5;
     $self_sufficient = isset($options[3]) ? $options[3] : 1;
     $misc_items = isset($options[4]) ? $options[4] : 0;
     $component_items = isset($options[5]) ? $options[5] : 0;
     $special = isset($options[6]) ? $options[6] : 0;
     $item_ids = $item_amounts = array();
     $top_level = TRUE;
     if ($desired_job == 'List') {
         $start = $end = null;
         $include_quests = FALSE;
         // Get the list
         $item_amounts = Session::get('list', array());
         $item_ids = array_keys($item_amounts);
         if (empty($item_ids)) {
             return redirect('/list');
         }
         view()->share(compact('item_ids', 'item_amounts'));
         $top_level = $item_amounts;
     }
     if ($desired_job == 'Item') {
         $item_id = $special;
         $start = $end = null;
         $include_quests = FALSE;
         // Get the list
         $item_amounts = array($item_id => 1);
         $item_ids = array_keys($item_amounts);
         if (empty($item_ids)) {
             return redirect('/list');
         }
         $item_special = true;
         view()->share(compact('item_ids', 'item_amounts', 'item_special'));
         $top_level = $item_amounts;
     }
     if (!$item_ids) {
         // Jobs are capital
         $desired_job = strtoupper($desired_job);
         // Make sure it's a real job, jobs might be multiple
         $job = [];
         foreach (explode(',', $desired_job) as $ds) {
             $job[] = ClassJob::get_by_abbr($ds);
         }
         // If the job isn't real, error out
         if (!isset($job[0])) {
             // Check for DOL quests
             $quests = array();
             foreach (array('MIN', 'BTN', 'FSH') as $job) {
                 $job = ClassJob::get_by_abbr($job);
                 $quests[$job] = QuestItem::where('classjob_id', $job->id)->orderBy('level')->with('item')->get();
             }
             $error = true;
             return view('crafting', compact('error', 'quests'));
         }
         $job_ids = [];
         foreach ($job as $j) {
             $job_ids[] = $j->id;
         }
         $full_name_desired_job = false;
         if (count($job) == 1) {
             $job = $job[0];
             $full_name_desired_job = $job->name->term;
         }
         // Starting maximum of 1
         if ($start < 0) {
             $start = 1;
         }
         if ($start > $end) {
             $end = $start;
         }
         if ($end - $start > 9) {
             $end = $start + 9;
         }
         // Check for quests
         $quest_items = QuestItem::with('classjob', 'classjob.abbr')->whereBetween('level', array($start, $end))->whereIn('classjob_id', $job_ids)->orderBy('level')->with('item')->get();
         view()->share(compact('job', 'start', 'end', 'quest_items', 'desired_job', 'full_name_desired_job'));
     }
     // Gather Recipes and Reagents
     $query = Recipes::with('name', 'classjob', 'classjob.name', 'classjob.abbr', 'item', 'item.name', 'item.quest', 'item.leve', 'item.vendors', 'item.beasts', 'item.clusters', 'item.clusters.classjob', 'item.clusters.classjob.abbr', 'reagents', 'reagents.vendors', 'reagents.beasts', 'reagents.clusters', 'reagents.clusters.classjob', 'reagents.clusters.classjob.abbr', 'reagents.recipe', 'reagents.recipe.name', 'reagents.recipe.item', 'reagents.recipe.item.name', 'reagents.recipe.item.vendors', 'reagents.recipe.item.beasts', 'reagents.recipe.item.clusters', 'reagents.recipe.item.clusters.classjob', 'reagents.recipe.item.clusters.classjob.abbr', 'reagents.recipe.classjob', 'reagents.recipe.classjob.abbr')->groupBy('recipes.item_id')->orderBy('rank');
     if ($item_ids) {
         $query->whereIn('recipes.item_id', $item_ids);
     } else {
         $query->whereHas('classjob', function ($query) use($job_ids) {
             $query->whereIn('classjob.id', $job_ids);
         })->whereBetween('level', array($start, $end));
     }
     $recipes = $query->get();
     // Do we not want miscellaneous items?
     if ($misc_items == 0 && $desired_job != 'List') {
         foreach ($recipes as $key => $recipe) {
             // Remove any Furnishings, Dyes and "Other"
             // ItemCategory 14 == 'Furnishing', 15 == 'Dye', 16 == 'Miscellany'
             // Miscellany is special, we want to keep any Miscellany if it's in a range of UI
             // ItemUICategory 12 to 32 are Tools (Primary/Secondary), keep those
             // Technically this only solves a Secondary tool issue.  Primary tools aren't part of 16/Miscellany
             if (in_array($recipe->item->itemcategory_id, [14, 15]) || $recipe->item->itemcategory_id == 16 && !in_array($recipe->item->itemuicategory_id, range(12, 32))) {
                 unset($recipes[$key]);
             }
         }
     }
     // Do we not want component items?
     if ($component_items == 0 && $desired_job != 'List') {
         foreach ($recipes as $key => $recipe) {
             // Remove any Miscellany
             // ItemUICategory of 63, as that's "Other"
             if ($recipe->item->itemuicategory_id == 63) {
                 unset($recipes[$key]);
             }
         }
     }
     // Fix the amount of the top level to be evenly divisible by the amount the recipe yields
     if (is_array($top_level)) {
         foreach ($recipes as $recipe) {
             $tl_item =& $top_level[$recipe->item_id];
             // If they're not evently divisible
             if ($tl_item % $recipe->yields != 0) {
                 // Make it so
                 $tl_item = ceil($tl_item / $recipe->yields) * $recipe->yields;
             }
         }
         unset($tl_item);
         view()->share('item_amounts', $top_level);
     }
     $reagent_list = $this->_reagents($recipes, $self_sufficient, 1, $include_quests, $top_level);
     // Look through the list.  Is there something we're already crafting?
     // Subtract what's being made from needed reagents.
     //  Example, culinary 11 to 15, you need olive oil for Parsnip Salad (lvl 13)
     //   But you make 3 olive oil at level 11.  We don't want them crafting another olive oil.
     foreach ($recipes as $recipe) {
         if (!isset($reagent_list[$recipe->item_id])) {
             continue;
         }
         $reagent_list[$recipe->item_id]['both_list_warning'] = TRUE;
         $reagent_list[$recipe->item_id]['make_this_many'] += 1;
     }
     // Look through the reagent list, make sure the reagents are evently divisible by what they yield
     foreach ($reagent_list as &$reagent) {
         // If they're not evently divisible
         if ($reagent['make_this_many'] % $reagent['yields'] != 0) {
             // Make it so
             $reagent['make_this_many'] = ceil($reagent['make_this_many'] / $reagent['yields']) * $reagent['yields'];
         }
     }
     unset($reagent);
     // Let's sort them further, group them by..
     // Gathered, Then by Level
     // Other (likely mob drops)
     // Crafted, Then by level
     // Bought, by price
     $sorted_reagent_list = ['Gathered' => [], 'Bought' => [], 'Other' => [], 'Pre-Requisite Crafting' => [], 'Crafting List' => []];
     $gathering_class_abbreviations = ClassJob::get_abbr_list(Config::get('site.job_ids.gathering'));
     foreach ($reagent_list as $reagent) {
         $section = 'Other';
         $level = 0;
         // Section
         if (in_array($reagent['self_sufficient'], $gathering_class_abbreviations)) {
             $section = 'Gathered';
             $level = $reagent['item']->level;
         } elseif ($reagent['self_sufficient']) {
             $section = 'Pre-Requisite Crafting';
             if (!isset($reagent['item']->recipe[0])) {
                 dd($reagent['item']);
             }
             $level = $reagent['item']->recipe[0]->level;
         } elseif (count($reagent['item']->vendors)) {
             $section = 'Bought';
             $level = $reagent['item']->min_price;
         }
         if (!isset($sorted_reagent_list[$section][$level])) {
             $sorted_reagent_list[$section][$level] = array();
         }
         $sorted_reagent_list[$section][$level][$reagent['item']->id] = $reagent;
         ksort($sorted_reagent_list[$section][$level]);
     }
     foreach ($sorted_reagent_list as $section => $list) {
         ksort($sorted_reagent_list[$section]);
     }
     // Sort the pre-requisite crafting by rank
     // We don't need to sort them by level, just make sure it's in the proper structure
     // The keys don't matter either
     $prc =& $sorted_reagent_list['Pre-Requisite Crafting'];
     $new_prc = array('1' => array());
     foreach ($prc as $vals) {
         foreach ($vals as $v) {
             $new_prc['1'][] = $v;
         }
     }
     // Sort them by rank first
     usort($new_prc['1'], function ($a, $b) {
         return $a['item']->rank - $b['item']->rank;
     });
     // Then by classjob
     usort($new_prc['1'], function ($a, $b) {
         return $a['item']->recipe[0]->classjob_id - $b['item']->recipe[0]->classjob_id;
     });
     $prc = $new_prc;
     $reagent_list = $sorted_reagent_list;
     return view('crafting.list', compact('recipes', 'reagent_list', 'self_sufficient', 'misc_items', 'component_items', 'include_quests'));
 }
Example #9
0
    	<span class="uk-thumbnail uk-border-circle b-g"></span> 
    	<span>: อนุมัติ</span>
    </div>
    <div class="uk-width-medium-1-6">
    	<span class="uk-thumbnail uk-border-circle b-r"></span> 
    	<span>: ไม่อนุมัติ</span>
    </div>
     <div class="uk-width-medium-1-6">
    	<span class="uk-thumbnail uk-border-circle b-y"></span> 
    	<span>: ยกเลิกการขอ</span>
    </div>
    <div class="uk-width-medium-1-5">
    	<span class="uk-text-warning"><i class="uk-icon-user"></i></span> 
    	<span>: พนักงานขับรถยนต์</span>
    </div>
     <div class="uk-width-medium-1-5">
    	<span class="uk-text-primary"><i class="uk-icon-tags"></i></span> 
    	<span>: ไปกับฝ่ายอื่น</span>
    </div>
</div>
<br />
<?php 
}
?>

<?php 
//echo $data->links();
echo $data->appends(Request::except('page'))->links();
?>

@stop
Example #10
0
 /**
  * Add a row to the cart
  * @param Request $request
  * @return array
  */
 public function prepareStore($request)
 {
     $code = $this->tax->findBy('code', $request->input('discount'));
     isset($code) ? $discount = $code->discount : ($discount = 0);
     $productPrice = $request->input('price');
     $price = (100 - $discount) / 100 * $productPrice;
     $data = $request->except(['_token', 'discount', 'price', 'color', 'size', 'img']);
     $data['price'] = $price;
     $data['options'] = $request->except(['_token', 'id', 'name', 'qty', 'price']);
     return $data;
 }
Example #11
0
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', 'HomeController@index');
Route::get('map', function () {
    return view('map');
});
use App\Location;
Route::post('create/location', function () {
    $input = Request::except("_token");
    if (Location::where('title_slug', str_slug($input['title']))->where('group', $input['group'])->first()) {
        die("Already exists");
    }
    if (!Request::has('group') || !Request::has('latlng') || !Request::has('map') || !Request::has('title')) {
        die("Not filled");
    }
    $location = new Location();
    $location->group = $input['group'];
    $location->latlng = $input['latlng'];
    $location->title = $input['title'];
    $location->title_slug = str_slug($input['title']);
    $location->map = $input['map'];
    $location->detail = $input['details'];
    $location->hidden_tokens = $input['hidden_tokens'];
    $location->save();
Example #12
0
            <div class="panel-body">

            	<div class="m-b-10 clearfix">

                	@include('table-view::elements._per_page_dropdown')

				    @include('table-view::elements._search_form')

				    @if ( $tableView->headerView() )
				    	<div class="pull-right">
				    		@include( $tableView->headerView() )
				    	</div>
				    @endif
            	</div>

                <div class="table-responsive">

                	@include( $tableView->present()->table() )

                </div>
            </div>
        </div>

		<div class="pull-right">
			<?php 
echo $tableView->data()->appends(Request::except('page'))->render();
?>
		</div>

    </div>
</div>
@extends('site.layouts._two_column')

@section('sidebar')
    @include('site.events._expired')
    @include('site.events._category')
    @include('site.events._tags')
    @parent
@stop

@section('content')

    {{-- Include Events Search Module --}}
    @include('site.events._search')

    @if(count($events))

        @foreach($events as $event)
            {{-- Include Events Results --}}
            @include('site.events._results')
        @endforeach

        <?php 
echo $events->appends(Request::except('page'))->links();
?>

    @else
        <h1> {{ trans('word.no_results') }} </h1>
    @endif

@stop
$roles = [];
?>
                @foreach ( $user->roles as $role )
                    <?php 
$roles[] = $role->name;
?>
                @endforeach
                {{ implode(',',$roles) }}
            </td>
            <td>{{ $user->active == 1 ? 'true':'false' }}</td>
            <td>

                <a href="{{  URL::action('AdminUsersController@printDetail',$user->id ) }}" class=" btn btn-xs btn-default"><i class="glyphicon glyphicon-print"></i> Print</a>
                <a href="{{  URL::action('AdminUsersController@edit',$user->id ) }}" class=" btn btn-xs btn-default">Edit</a>
                {{ Form::open(array('method' => 'DELETE', 'action' => array('AdminUsersController@destroy', $user->id))) }}
                    {{ Form::submit('Delete', array('class' => 'btn btn-xs btn-danger')) }}
                {{ Form::close() }}
            </td>
        </tr>
        @endforeach
		</tbody>
	</table>
</div>
<div class="row">
    <div class="col-md-12">
       <?php 
echo $users->appends(Request::except('page'))->links();
?>
    </div>
</div>
@stop
Example #15
0
 /**
  * Facilitador para montagem da datagrid
  * 
  * @param  array $rows      Linhas pra montar a datagrid
  * @param  array $fields_config Configuracao de campos
  * @param  string $pkey        Nome da primary key
  * @param  string $modelName   Nome do model
  * @return array              Tabela + paginator
  */
 public function get(array $rows, $fields_config, $pkey = false)
 {
     $modelName = view()->shared('controller');
     // Instancia a tabela
     $table = new TableLogic();
     // Trata os fields, apenas para pegar os nomes
     $field_names = array_keys($fields_config);
     // Adiciona as classes na tabela
     $table->addTableClass(['table', 'table-striped', 'check-all-container']);
     $headers = array();
     // Monta todos os cabecalhos, inclusive os dinamicos
     if ($this->hasCheck) {
         $headers['checks'] = [\Form::checkbox('idx', '', '', ['class' => 'checkbox check-all'])];
     }
     $headers = array_merge($headers, $field_names);
     if ($this->hasActions) {
         $headers['actions'] = trans($modelName . '.actions');
     }
     // Traducao dos headers, que vem com os nomes do banco de dados,
     // aqui eles tomam nomes especificos dos arquivos de configuracao
     $headersTranslated = [];
     foreach ($headers as $field_key => $field_name) {
         // Se nao for numerico, indica um conteudo customizado
         if (is_numeric($field_key)) {
             // Busca a traducao para o campo
             $headersTranslated[$field_name] = isset($fields_config[$field_name]['trans']) ? $fields_config[$field_name]['trans'] : trans($modelName . '.' . $field_name . '.grid');
             if (isset($fields_config[$field_name]['type']) && $fields_config[$field_name]['type'] == 'primaryKey') {
                 $pkey = $fields_config[$field_name]['name'];
             }
             // Aqui faz o tratamento do link no titulo,
             // Usado para campos de busca, ordenacao, etc
             if (isset($fields_config[$field_name]['searchable']) && $fields_config[$field_name]['searchable']) {
                 // Insere o link nos items marcados como searchable (o link e de ordenacao)
                 $headersTranslated[$field_name] = [\Html::tag('a', $headersTranslated[$field_name], ['href' => "?order={$field_name}&card=" . (\Request::input('order') == $field_name && \Request::input('card', 'desc') == 'asc' ? 'desc' : 'asc') . "&" . http_build_query(\Request::except(['order', 'card', 'page']))])];
             }
         } else {
             // Conteudo customizado
             $headersTranslated[$field_key] = $field_name;
         }
     }
     // Setta os headers
     $table->setHeaders($headersTranslated);
     // Monta as linhas
     // Fiz essa alteracao por causa do presenter()
     $dataRows = [];
     foreach ($rows as $row) {
         // Monta as colunas
         $dataCols = [];
         // Faz o tratamento campo-a-campo
         foreach ($field_names as $field_name) {
             // Se for um array simples, tratar como informacoes solidas
             if (is_array($row)) {
                 // Verifica se esta sendo passado um retorno-array
                 if (is_array($row[$field_name])) {
                     // Vericica a presenca do indice formatador
                     if (isset($fields_config[$field_name]['format'])) {
                         // Faz o vsprintf no campo, caso esteja sendo passado um array para a formacao do campo
                         $dataCols[$field_name] = vsprintf($fields_config[$field_name]['format'], $row[$field_name]);
                     } else {
                         // Variavel que guarda os valores, para informar a serem formatados
                         $data_help = json_encode($row[$field_name]);
                         // Variavel que guarda a sugestao de formatacao pro elemento
                         $data_help_f = ['name' => $field_name, 'format' => str_repeat('%s ', count($row[$field_name]))];
                         // Joga uma exception pro programador identificar o que pode ser feito no elemento
                         throw new \Exception("This field need format!\nAdd this to your config call: \"" . var_export($data_help_f, true) . "\"\nFractal data: \"" . $data_help . "\"");
                     }
                 } else {
                     // Tenta identificar um valor multiplo definido no form-values para a traducao
                     $translation_string = "{$modelName}.{$field_name}.form_values.{$row[$field_name]}";
                     $translation_intent = trans($translation_string);
                     if ($translation_string != $translation_intent) {
                         $row[$field_name] = $translation_intent;
                     }
                     // Atribui o valor a coluna
                     $dataCols[$field_name] = $row[$field_name];
                 }
             } else {
                 // Tratamento para relacionamentos (para exibir os items dentro da listagem)
                 if (isset($fields_config[$field_name]['relationship']) && $fields_config[$field_name]['relationship']) {
                     // Define a relacao
                     $relation = $fields_config[$field_name]['relationship'];
                     // Verifica se tem o metodo para exibir os campos adicionais
                     if ($row->{$field_name . 's'}) {
                         // Entra no metodo (Eloquent), retornando ele pega o nome do campo, definido no relationship
                         // Existe um projeto ai pra fazer esse campo ser dinamico kk
                         //
                         // Possivel acao do controlador (definido no mconfig)
                         $controller_edit_action = (isset($relation['controller']) ? $relation['controller'] : 'Dummy') . '@getEdit';
                         // Campo de edicao
                         $field_key = $row->{$field_name . 's'}->{$relation['field_key']};
                         // Verifica a existencia de rota-relacionada (click to edit)
                         if (\Route::getRoutes()->getByAction($controller_edit_action)) {
                             // Link para a edicao do relacionado
                             $dataCols[$field_name] = \Html::tag('a', $row->{$field_name . 's'}->{$relation['field_show']}, ['href' => action('Admin\\' . class_basename($controller_edit_action), [$field_key])]);
                         } else {
                             $dataCols[$field_name] = $row->{$field_name . 's'}->{$relation['field_show']};
                         }
                     } else {
                         // Se nao existe, bota um zerado ae
                         $dataCols[$field_name] = '';
                     }
                 } else {
                     // Setta a coluna com o presenter no array de colunas
                     $dataCols[$field_name] = $row->present()->{$field_name};
                     // $dataCols[$field_name] = $row[$field_name];
                 }
             }
         }
         if ($pkey) {
             // Adiciona o check individual
             $dataCols['checks'] = array(\Form::checkbox('id_sec[]', $row[$pkey], '', ['class' => 'checkbox']));
             if ($this->hasActions) {
                 // Adiciona os botoes
                 $dataCols['actions'] = array();
                 // Botao de edição
                 if ($this->hasActionEdit) {
                     $dataCols['actions'][] = $table->button(array('link' => action('Admin\\' . $modelName . 'Controller@getEdit', [$dataCols[$pkey]]), 'attributes' => ['class' => 'glyphicon glyphicon-edit btn btn-sm btn-success', 'title' => trans($modelName . '.button_edit')]));
                 }
                 // Botão de alteração de status (personalizado então não é obrigatório)
                 if ($this->hasActionStatusChange) {
                     if (isset($dataCols['ind_status']) && !empty($dataCols['ind_status'])) {
                         $status = substr($dataCols['ind_status'], 0, 1);
                         $dataCols['actions'][] = $table->button(array('link' => action('Admin\\' . $modelName . 'Controller@getSwitchStatus', [$dataCols[$pkey]]), 'attributes' => ['title' => trans($modelName . '.' . ($status == 'A' ? 'button_status_disable' : 'button_status_enable')), 'class' => 'confirm-before-go glyphicon btn btn-sm ' . ($status == 'A' ? 'glyphicon-ban-circle btn-warning' : 'glyphicon-ok btn-info')]));
                     }
                 }
                 // Botão de exclusão
                 if ($this->hasActionDelete) {
                     $dataCols['actions'][] = $table->button(array('link' => action('Admin\\' . $modelName . 'Controller@getDelete', [$dataCols[$pkey]]), 'attributes' => ['title' => trans($modelName . '.button_delete'), 'class' => 'glyphicon glyphicon-trash btn btn-sm btn-danger confirm-before-go']));
                 }
                 // ## Botoes customizados ##
                 if (isset($this->buttons) && !empty($this->buttons)) {
                     $btns = $this->buttons;
                     foreach ($btns as $btn) {
                         $dataCols['actions'][] = sprintf($table->button($btn), $dataCols[$pkey]);
                     }
                 }
             }
         } else {
             $dataCols['checks'] = array();
             $dataCols['actions'] = array();
         }
         $dataRows[] = $dataCols;
         // Setta a linha no array de linhas
         $table->insertRow($dataCols);
     }
     // Retorna a tabela montada
     return $table->getTable();
 }