Skip to content

Instantly share code, notes, and snippets.

View elton182's full-sized avatar

Elton Nicolau elton182

View GitHub Profile
@elton182
elton182 / phpci.yml
Created February 4, 2017 12:38 — forked from skecskes/phpci.yml
phpci.yml Laravel 5 config
build_settings:
verbose: false
prefer_symlink: false
setup:
composer:
action: "install"
prefer_dist: false
test:
<?php
namespace safed\Traits;
Trait DataTablesTrait{
/**
* receices the model collection with records and return a json needed for the datatable
* receives de name of the Controller to generate correct URLs
* receives the customfields (for relations) that you want to return with the json
@elton182
elton182 / UserController.php
Last active January 2, 2024 20:17
(Cakephp) Datatable Example - With custom column search and cache pagination
<?php
namespace App\Controller;
use App\Controller\AppController;
use Cake\Network\Email\Email;
/**
* Users Controller
*
* @property \App\Model\Table\UsersTable $Users
@elton182
elton182 / select.php
Created November 29, 2016 14:11
Select com laravel
<select id="subject_id" name="subject_id" placeholder="Selecione um assunto..." >
<option value="">Selecione um assunto...</option>
@foreach ($subjects as $subject)
<option value="{{$subject->id}} ">
{{$subject->description}}
</option>
@endforeach
</select>