A Starter Application Powered By Sentinel on Laravel

Built for Cartalyst SubscribersSubscribe

Start Right, Start Fast

Fully Integrated Authentication & Authorization

Every application needs some level of authorization & authentication. Sentinel Kickstart provides a robust set of features used by thousands of developers backed by a dedicated support team.

Well Designed

A Clean and simple architecture includes all views necessary for an authorized and authenticated application .

Social Ready

Allows you to authenticate your users through popular social networks & other OAuth 1/2 providers.

Thoroughly Documented

A Semantically versioned & well supported code base that adheres to high documentation standards both inside and out.

Sentinel and Sentinel Add-on Manuals

Multi-Tenancy, Expiring Permissions, and OAuth Server Add-ons coming soon!

Sentinel Social Unique Passwords

Getting Started

A quickstart guide to get you started

Learning to Register

Registration allows you to collect details from a user for registration.

public function register()
	if ($user = Sentinel::register(Input::all()))
		return Redirect::home()->withSuccess('Registration complete.');

	return Redirect::back()->withInput()->withErrors('An error occured while registering.');

Learning to Authenticate

Authentication allows you to collect details from a user for authentication. Creating a session and returning the user object.

public function authenticate()
	if ($auth = Sentinel::authenticate(Input::all()))
		return Redirect::intended();

	return Redirect::back()
		->withErrors('Invalid login or password.');

Update user data

Once you have authenticated, a session has been created. At this point you'll most likely want to do something with the users meta data.

public function update()
	$input = Input::all();

	$user = Sentinel::getUser();

	Sentinel::update($user, $input);

	return Redirect::back()
		->withSuccess('User successfully updated.');

Assign a user a role

Assigning roles will ensure the permissions set on the role are inherited on the user.

public function assignRole()
	$role = Sentinel::findRoleBySlug('admin');

	$user = Sentinel::getUser();


	return Redirect::back()
		->withSuccess('Role attached successfully.');

Add a permission to a role

Adding permissions to perform checks against later on.

public function addPermission()
	$permission = Input::get('permission');

	$role = Sentinel::findRoleBySlug('admin');


	return Redirect::back()->withSuccess('Permission added successfully.');

Check against a permission

Performing permission checks can be conducted using route filters.

Route::filter('auth.admin', function()
	if ( ! Sentinel::hasAccess('admin'))
		return Redirect::home()->withErrors('You are not permitted to access this area.');