This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Yajra\Datatables\Html\Builder; // import class on controller | |
/** | |
* Datatables Html Builder | |
* @var Builder | |
*/ | |
protected $htmlBuilder; | |
public function __construct(Builder $htmlBuilder) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName myapp.localhost.com | |
DocumentRoot "/home/vagrant/projects/myapp/public" | |
<Directory "/home/vagrant/projects/myapp/public"> | |
AllowOverride all | |
</Directory> | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Seeder; | |
use Illuminate\Database\Eloquent\Model; | |
class DatabaseSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Crear un controlador: | |
php artisan make:controller NombreControladorController | |
Crear un modelo: | |
php artisan make:model NombreModelo | |
Crear un request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Eloquent\SoftDeletes; | |
class Flight extends Model | |
{ | |
use SoftDeletes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://cdn.datatables.net/plug-ins/1.10.12/i18n/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DataTable { | |
var $database = "test"; | |
var $host = "127.0.0.1"; | |
var $user = "usertest"; | |
var $pass = "secret"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Seleccionar un option específico en un select | |
$('option[value="SEL1"]').prop('selected', true); //Por value | |
$('option:eq(1)').prop('selected', true); //Por índice | |
$('option:contains("Selección 1")').prop('selected', true); //Por algún texto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( '#my-form' ) | |
.submit( function( e ) { | |
$.ajax( { | |
url: 'http://host.com/action/', | |
type: 'POST', | |
data: new FormData( this ), | |
processData: false, | |
contentType: false | |
} ); | |
e.preventDefault(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="row row-centered"> | |
<div class="col-xs-6 col-centered"></div> | |
<div class="col-xs-6 col-centered"></div> | |
<div class="col-xs-3 col-centered"></div> | |
<div class="col-xs-3 col-centered"></div> | |
<div class="col-xs-3 col-centered"></div> | |
</div> | |
</div> |
OlderNewer