Skip to content

Instantly share code, notes, and snippets.

View henriquesousa's full-sized avatar

Henrique Sousa Ribeiro henriquesousa

View GitHub Profile
@henriquesousa
henriquesousa / nav-bar.php
Created July 27, 2015 04:27
Adicionando classe 'active' com jQuery em cada página visitada.
<script>
$(document).ready(function(){
var aurl = window.location.pathname;
$('.main-nav li a[href$="'+aurl+'"]').parents('li').addClass('active');
});
</script>
<nav class="main-nav">
<ul class="list-unstyled">
<li class="">
@henriquesousa
henriquesousa / User.php
Created October 5, 2014 17:06
Autenticação de usuários com tabela diferente ( Ex: tabela funcionarios ) desculpem a simplicidade mas o importante é que deu certo :)
<?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface {
use UserTrait, RemindableTrait;