Giter Site home page Giter Site logo

sentinel's Introduction

Sentinel: Sentry Implementation for Laravel 4

This pacakge provides an implementation of Sentry 2 for Laravel 4. By default it uses Bootstrap 3.0, but you can make use of whatever UI you want.

This package is based on my L4withSentry demo repo.

Instructions

This package can be installed using Composer:

$ composer require rydurham/sentinel

Make sure you have configured your app's Database and Mail settings.

Add the Service Provider to your app/config/app.php file:

'providers' => array(
     ...
    'Sentinel\SentinelServiceProvider',  
    )

Run the Migrations:

php artisan migrate --package=rydurham/sentinel

Seed the Database:

php artisan db:seed --class="SentinelDatabaseSeeder"

Publish the package assets:

php artisan asset:publish rydurham/sentinel

Set a "Home" Route. This package requires that you have a named 'home' route in your routes.php file:

// Set Home Route
 Route::get('/', array('as' => 'home', function()
{
    return View::make('home');
}));

Optional: Publish Views

php artisan view:publish rydurham/sentinel

Optional: Publish Configuration

php artisan config:publish rydurham/sentinel

The config file will allow you to control many aspects of Sentinels operation. Take a look to see what options are available. If you want to add fields to your user table, this can be done with the config options.

Usage: Filters and Routes

Once installed, Sentinel adds a series of routes for User interaction. You will need to add links to these routes in your app's layouts.

  • yoursite.tld/login
  • yoursite.tld/logout
  • yoursite.tld/register
  • yoursite.tld/users - For user management. Only available to admins
  • yoursite.tld/groups - For group management. Only available to admins.

Sentinel also provides these filters which you can use to prevent unauthorized access to your app's routes & methods.

  • Sentinel\auth - Require users to be successfully logged in
  • Sentinel\inGroup:Admins - Block access to all but members of the Admin group. If you create your own groups, you can use it as such: Sentinel\inGroup:[YourGroup].

Documentation & Questions

Check the Wiki for more information about the package:

  • Config Options
  • Events & Listeners
  • Seed & Migration Details
  • Default Routes
  • Basic API Info
  • Package Version History

Any questions about this package should be posted on the package website.

To Do

  • Set up testing with Travis
  • Increase test coverage - currently the tests are very limited.
  • Add More languages?

Thanks

sentinel's People

Contributors

adis-io avatar alograg avatar basjac avatar chemerys avatar darit avatar eliasrodrigues avatar falonofthetower avatar hongaar avatar jimthedev avatar kjventura avatar ricardocanelas avatar rydurham avatar stramel avatar the0rem avatar unliu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.