Skip to content

Instantly share code, notes, and snippets.

@brayann
brayann / Laravel.php
Created November 26, 2012 01:56
Diferença entre Rails x Laravel
Class User extends Eloquent {
public $acessible = array ('name', 'email');
public function posts () {
return $this->has_many('Post');
}
@brayann
brayann / hints.md
Last active August 29, 2015 14:08
Buenos aires trip

Dicas úteis

  • Não confie em taxistas (cuidado com eles trocando notas por notas falsas, e não faça cambio com eles)
  • Nao troque real por peso no aeroporto, tem o real blue (paralelo) que vale mais que um real a mais por peso (troquei hoje o real por 4,70 pesos. No aeroporto está 3,50)
  • Traga grana suficiente pra nao ter que usar cartão, pois não compensa.
  • Se sobrar pesos, gaste no free shop :) pois ao pegar do paralelo valerá bem mais.
  • Prepare-se para não comer tão bem igual no Brasil hehe :(
  • Acho que é obvio, mas traga blusas
  • Busão só se paga com moedas, caso for andar

Places to go

@brayann
brayann / gist:3ea0bbf0b8c181479a49
Created January 30, 2015 01:48
Pagination Issue
If I add this code to my query:
->leftJoin('event_schedule', function($join) {
$join->on('event_schedule.foreign_id', '=', 'crm_actions.id')
->where('event_schedule.event_id', '=', 6);
})
I receive this
array (size=7)
'total' => int 19

Keybase proof

I hereby claim:

  • I am brayann on github.
  • I am brayanrastelli (https://keybase.io/brayanrastelli) on keybase.
  • I have a public key whose fingerprint is F469 7BFE D194 5DF4 AB29 2F63 B448 0867 07AE 37C6

To claim this, I am signing this object: