Skip to content

Instantly share code, notes, and snippets.

View wdog's full-sized avatar
🎯
Focusing

wdog wdog

🎯
Focusing
View GitHub Profile
@wdog
wdog / grid.php
Created July 21, 2016 14:57
HTML5
<?php
$form_unique_id = uniqid();
?>
<form id="form_<?= $grid->getConfig()->getName() ?>"></form>
<?php
/** @var Nayjest\Grids\DataProvider $data * */
/** @var Nayjest\Grids\Grid $grid * */
?>
<table class="table table-striped" id="<?= $grid->getConfig()->getName() ?>">
@wdog
wdog / input.php
Created July 21, 2016 14:56
HTML5
<?php
/** @var Nayjest\Grids\Filter $filter */
?>
<input
form="form_<?= $grid->getConfig()->getName() ?>"
class="form-control input-sm"
name="<?= $filter->getInputName() ?>"
value="<?= $filter->getValue() ?>"
/>
<?php
/** @var Nayjest\Grids\Filter $filter */
/** @var Nayjest\Grids\SelectFilterConfig $cfg */
$cfg = $filter->getConfig();
$onchange = '';
if (method_exists($cfg, 'isSubmittedOnChange') && $cfg->isSubmittedOnChange()) {
$onchange = 'onchange="this.form.submit()"';
}
?>
<select
@wdog
wdog / ModelEventLogger.php
Last active July 13, 2016 08:50
TRAIT LOG ACTIVITY
<?php
namespace App\Wdog\Traits;
use App\Wdog\Entities\LogAction;
use Auth;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
@wdog
wdog / git
Created October 16, 2015 13:49 — forked from cdwilson/git
ubuntu apache config for git virtual host - /etc/apache2/conf.d/git
<VirtualHost *:80>
ServerName git.server
ServerAdmin [email protected]
DocumentRoot /usr/share/gitweb
<Directory /usr/share/gitweb>
Options FollowSymLinks ExecCGI
AddHandler cgi-script cgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f