Skip to content

Instantly share code, notes, and snippets.


Miftah Afina miftahafina

Block or report user

Report or block miftahafina

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile


Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

View gist:e3b917e93d7dfc754210
<!-- Example on how to set class="active" on active navigation links -->
<!-- These links will always be visible -->
<li class="{{ Request::is( 'home') ? 'active' : '' }}">
<a href="{{ URL::to( 'home') }}">
<li class="{{ Request::is( 'gallery') ? 'active' : '' }}">
You can’t perform that action at this time.