- 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
- Compass - Open source CSS Authoring Framework.
- Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
- Font Awesome - The iconic font designed for Bootstrap.
- Zurb Foundation - Framework for writing responsive web sites.
- SASS - CSS extension language which allows variables, mixins and rules nesting.
- Skeleton - Boilerplate for responsive, mobile-friendly development.
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
public function postAtendimentos() | |
{ | |
// Regras de validação do formulário | |
$validator = \Validator::make(\Input::all(), | |
array( | |
'assunto' => 'required|min:5', | |
'cliente' => 'required|min:1', | |
'categoria' => 'required|min:1', | |
'descricao' => 'required|min:20', | |
'status' => 'required|min:5' |
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 | |
$current_date = new DateTime( '2014-10-24 21:37:00' ); // 2011-12-04 20:13:35 | |
$current_date->add( new DateInterval( 'PT22H' ) ); | |
echo $current_date->format( 'Y-m-d H:i:s' ); // 2011-12-07 20:13:35 |
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
class Veiculo extends Eloquent{ | |
protected $table = 'veiculo'; | |
protected $primaryKey = 'nr_veiculo'; | |
public $with = [ 'Marca' ]; // related relationship | |
public function marca(){ | |
return $this->hasOne('marca','nr_marca_veiculo','nr_marca_veiculo'); | |
} | |
// controller | |
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
return $this->where('cnpj', '=', $cnpj) | |
->whereHas('licencas', function($q) use($chaveInstalacao){ | |
$q->where('chaveInstalacao', '=', $chaveInstalacao ); // Where category name | |
})->with(['licencas' => function($q) use($chaveInstalacao) { | |
$q->where('chaveInstalacao', '=', $chaveInstalacao ); | |
}])->limit(1)->first(); |
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\Modules\News\Models; | |
use Carbon\Carbon, Model\Category, Model\Tags, Model\Categorys, Debugbar; | |
class News extends \Eloquent { | |
public $with = [ 'tags', 'category' ]; // related relationship |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#!/bin/bash | |
#your db settings | |
USER="db_root" | |
PASS="db_pass" | |
OUTPUT="/path/to/backup/folder" | |
HOST="mysql_host" | |
DATE=`date +%d%m%y%H%M` | |
databases=`mysql --host=$HOST --user=$USER --password=$PASS -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` |
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
App::error(function(Exception $exception, $code) | |
{ | |
if (!Config::get('app.debug')) { | |
Log::error($exception); | |
return App::make('App\Modules\Home\Controllers\HomeController')->ErrorPage($code); | |
} | |
}); |
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
$variavel = $questInstance->getReqInfo("npc",0); | |
if(array_key_exists('stringStore', $variavel)) | |
{ | |
# code... | |
} |