Skip to content

Instantly share code, notes, and snippets.

Rahmat Awaludin rawaludin

Block or report user

Report or block rawaludin

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
View Laravel Sentry 2 with multiple user

Sentry is an amazing auth system. But I really need a feature: multiple user types in the same app. And I cannot separate those in groups, because they have different table columns. After 2 days burning my head, I think I found a good solution. The magic is duplicate SentryServiceProvider with new different settings.

This was tested on Laravel 4.0 and Sentry 2. If you're using other version of Sentry, my suggestion is to follow same steps from this gist but use your local files instead copying files from here.

Lets suppose we have a fresh Sentry install with default User ambient. Now we want another ambient called Admin, with new model and different settings. How to do:

1. One model, one ambient

View gist:9092765


Now Hiring:

At we are looking to expand our small team to include a number of new development positions ahead of a major project. Go ahead and take a look at the role descriptions. If the must haves don't quite fit, let us know anyway, you never know!

Front-end Developer

Must have

rawaludin / gist:3889706
Created Oct 14, 2012 — forked from padolsey/gist:527683
Snippet: JavaScript - Detect IE
View gist:3889706
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
You can’t perform that action at this time.