From 717fca92c88111f1aa10303f10033966cd384d1a Mon Sep 17 00:00:00 2001 From: Suhayb El Wardany Date: Sat, 14 Jun 2014 23:12:18 +0200 Subject: [PATCH] sentinel Signed-off-by: Suhayb El Wardany --- app/commands/DemoInstallCommand.php | 2 +- app/config/session.php | 2 +- app/controllers/AuthController.php | 6 +++--- app/controllers/GroupsController.php | 4 ++-- app/controllers/UsersController.php | 4 ++-- app/routes.php | 20 +++++++++---------- .../account/home.blade.php | 0 .../emails/activate.blade.php | 0 .../emails/reminder.blade.php | 0 .../groups/form.blade.php | 0 .../groups/index.blade.php | 0 .../{sentry => sentinel}/index.blade.php | 20 +------------------ .../{sentry => sentinel}/login.blade.php | 0 .../{sentry => sentinel}/register.blade.php | 0 .../reset/begin.blade.php | 0 .../reset/complete.blade.php | 0 .../swipe/register.blade.php | 0 .../swipe/sms/code.blade.php | 0 .../swipe/sms/register.blade.php | 0 .../{sentry => sentinel}/users/form.blade.php | 0 .../users/index.blade.php | 0 app/views/{sentry => sentinel}/wait.blade.php | 0 app/views/template.blade.php | 2 +- readme.md | 2 +- 24 files changed, 22 insertions(+), 40 deletions(-) rename app/views/{sentry => sentinel}/account/home.blade.php (100%) rename app/views/{sentry => sentinel}/emails/activate.blade.php (100%) rename app/views/{sentry => sentinel}/emails/reminder.blade.php (100%) rename app/views/{sentry => sentinel}/groups/form.blade.php (100%) rename app/views/{sentry => sentinel}/groups/index.blade.php (100%) rename app/views/{sentry => sentinel}/index.blade.php (61%) rename app/views/{sentry => sentinel}/login.blade.php (100%) rename app/views/{sentry => sentinel}/register.blade.php (100%) rename app/views/{sentry => sentinel}/reset/begin.blade.php (100%) rename app/views/{sentry => sentinel}/reset/complete.blade.php (100%) rename app/views/{sentry => sentinel}/swipe/register.blade.php (100%) rename app/views/{sentry => sentinel}/swipe/sms/code.blade.php (100%) rename app/views/{sentry => sentinel}/swipe/sms/register.blade.php (100%) rename app/views/{sentry => sentinel}/users/form.blade.php (100%) rename app/views/{sentry => sentinel}/users/index.blade.php (100%) rename app/views/{sentry => sentinel}/wait.blade.php (100%) diff --git a/app/commands/DemoInstallCommand.php b/app/commands/DemoInstallCommand.php index 7f56c245..2d708f5c 100644 --- a/app/commands/DemoInstallCommand.php +++ b/app/commands/DemoInstallCommand.php @@ -39,7 +39,7 @@ public function fire() { $this->call('migrate'); $this->call('migrate:reset'); - $this->call('migrate', ['--package' => 'cartalyst/sentry', '--seed' => true]); + $this->call('migrate', ['--package' => 'cartalyst/sentinel', '--seed' => true]); if (file_exists($path = $this->laravel['path.storage'].'/logs/laravel.log')) { diff --git a/app/config/session.php b/app/config/session.php index e7d98710..c5744338 100644 --- a/app/config/session.php +++ b/app/config/session.php @@ -96,7 +96,7 @@ | */ - 'cookie' => 'demo_sentry_session', + 'cookie' => 'demo_sentinel_session', /* |-------------------------------------------------------------------------- diff --git a/app/controllers/AuthController.php b/app/controllers/AuthController.php index 000eb0e1..682410c8 100644 --- a/app/controllers/AuthController.php +++ b/app/controllers/AuthController.php @@ -12,7 +12,7 @@ class AuthController extends BaseController { */ public function login() { - return View::make('sentry.login'); + return View::make('sentinel.login'); } /** @@ -68,7 +68,7 @@ public function processLogin() */ public function register() { - return View::make('sentry.register'); + return View::make('sentinel.register'); } /** @@ -99,7 +99,7 @@ public function processRegistration() $code = $activation->code; - $sent = Mail::send('sentry.emails.activate', compact('user', 'code'), function($m) use ($user) + $sent = Mail::send('sentinel.emails.activate', compact('user', 'code'), function($m) use ($user) { $m->to($user->email)->subject('Activate Your Account'); }); diff --git a/app/controllers/GroupsController.php b/app/controllers/GroupsController.php index 9b114977..4e84ed67 100644 --- a/app/controllers/GroupsController.php +++ b/app/controllers/GroupsController.php @@ -30,7 +30,7 @@ public function index() { $groups = $this->groups->paginate(); - return View::make('sentry.groups.index', compact('groups')); + return View::make('sentinel.groups.index', compact('groups')); } /** @@ -114,7 +114,7 @@ protected function showForm($mode, $id = null) $group = $this->groups; } - return View::make('sentry.groups.form', compact('mode', 'group')); + return View::make('sentinel.groups.form', compact('mode', 'group')); } /** diff --git a/app/controllers/UsersController.php b/app/controllers/UsersController.php index 7c4757e3..899be950 100644 --- a/app/controllers/UsersController.php +++ b/app/controllers/UsersController.php @@ -30,7 +30,7 @@ public function index() { $users = $this->users->createModel()->paginate(); - return View::make('sentry.users.index', compact('users')); + return View::make('sentinel.users.index', compact('users')); } /** @@ -114,7 +114,7 @@ protected function showForm($mode, $id = null) $user = $this->users->createModel(); } - return View::make('sentry.users.form', compact('mode', 'user')); + return View::make('sentinel.users.form', compact('mode', 'user')); } /** diff --git a/app/routes.php b/app/routes.php index 5831206a..d0132c79 100644 --- a/app/routes.php +++ b/app/routes.php @@ -48,7 +48,7 @@ return Redirect::to('account'); } - return View::make('sentry/index'); + return View::make('sentinel.index'); }); Route::get('login', 'AuthController@login'); @@ -59,7 +59,7 @@ Route::get('wait', function() { - return View::make('sentry.wait'); + return View::make('sentinel.wait'); }); Route::get('activate/{id}/{code}', function($id, $code) @@ -91,7 +91,7 @@ $code = $activation->code; - $sent = Mail::send('sentry.emails.activate', compact('user', 'code'), function($m) use ($user) + $sent = Mail::send('sentinel.emails.activate', compact('user', 'code'), function($m) use ($user) { $m->to($user->email)->subject('Activate Your Account'); }); @@ -115,7 +115,7 @@ Route::get('reset', function() { - return View::make('sentry.reset.begin'); + return View::make('sentinel.reset.begin'); }); Route::post('reset', function() @@ -148,7 +148,7 @@ $code = $reminder->code; - $sent = Mail::send('sentry.emails.reminder', compact('user', 'code'), function($m) use ($user) + $sent = Mail::send('sentinel.emails.reminder', compact('user', 'code'), function($m) use ($user) { $m->to($user->email)->subject('Activate Your Account'); }); @@ -166,7 +166,7 @@ { $user = Sentinel::findById($id); - return View::make('sentry.reset.complete'); + return View::make('sentinel.reset.complete'); })->where('id', '\d+'); @@ -213,7 +213,7 @@ $persistence = Sentinel::getPersistence(); - return View::make('sentry.account.home', compact('user', 'persistence')); + return View::make('sentinel.account.home', compact('user', 'persistence')); }); Route::get('kill/{code}', function($code) @@ -242,7 +242,7 @@ Session::reflash(); - return View::make('sentry.swipe.register', compact('login', 'code')); + return View::make('sentinel.swipe.register', compact('login', 'code')); }); Route::get('registered', function() @@ -285,7 +285,7 @@ Session::reflash(); - return View::make('sentry.swipe.sms.register'); + return View::make('sentinel.swipe.sms.register'); }); Route::post('register', function() @@ -351,7 +351,7 @@ Session::reflash(); - return View::make('sentry.swipe.sms.code'); + return View::make('sentinel.swipe.sms.code'); }); Route::post('code', function() diff --git a/app/views/sentry/account/home.blade.php b/app/views/sentinel/account/home.blade.php similarity index 100% rename from app/views/sentry/account/home.blade.php rename to app/views/sentinel/account/home.blade.php diff --git a/app/views/sentry/emails/activate.blade.php b/app/views/sentinel/emails/activate.blade.php similarity index 100% rename from app/views/sentry/emails/activate.blade.php rename to app/views/sentinel/emails/activate.blade.php diff --git a/app/views/sentry/emails/reminder.blade.php b/app/views/sentinel/emails/reminder.blade.php similarity index 100% rename from app/views/sentry/emails/reminder.blade.php rename to app/views/sentinel/emails/reminder.blade.php diff --git a/app/views/sentry/groups/form.blade.php b/app/views/sentinel/groups/form.blade.php similarity index 100% rename from app/views/sentry/groups/form.blade.php rename to app/views/sentinel/groups/form.blade.php diff --git a/app/views/sentry/groups/index.blade.php b/app/views/sentinel/groups/index.blade.php similarity index 100% rename from app/views/sentry/groups/index.blade.php rename to app/views/sentinel/groups/index.blade.php diff --git a/app/views/sentry/index.blade.php b/app/views/sentinel/index.blade.php similarity index 61% rename from app/views/sentry/index.blade.php rename to app/views/sentinel/index.blade.php index 0bec2968..6a371ab5 100644 --- a/app/views/sentry/index.blade.php +++ b/app/views/sentinel/index.blade.php @@ -8,11 +8,7 @@

This demo provides you a solid foundation of controllers and views for your next Application.

- Github - - + Github


What's new

@@ -35,18 +31,4 @@ - - - @stop diff --git a/app/views/sentry/login.blade.php b/app/views/sentinel/login.blade.php similarity index 100% rename from app/views/sentry/login.blade.php rename to app/views/sentinel/login.blade.php diff --git a/app/views/sentry/register.blade.php b/app/views/sentinel/register.blade.php similarity index 100% rename from app/views/sentry/register.blade.php rename to app/views/sentinel/register.blade.php diff --git a/app/views/sentry/reset/begin.blade.php b/app/views/sentinel/reset/begin.blade.php similarity index 100% rename from app/views/sentry/reset/begin.blade.php rename to app/views/sentinel/reset/begin.blade.php diff --git a/app/views/sentry/reset/complete.blade.php b/app/views/sentinel/reset/complete.blade.php similarity index 100% rename from app/views/sentry/reset/complete.blade.php rename to app/views/sentinel/reset/complete.blade.php diff --git a/app/views/sentry/swipe/register.blade.php b/app/views/sentinel/swipe/register.blade.php similarity index 100% rename from app/views/sentry/swipe/register.blade.php rename to app/views/sentinel/swipe/register.blade.php diff --git a/app/views/sentry/swipe/sms/code.blade.php b/app/views/sentinel/swipe/sms/code.blade.php similarity index 100% rename from app/views/sentry/swipe/sms/code.blade.php rename to app/views/sentinel/swipe/sms/code.blade.php diff --git a/app/views/sentry/swipe/sms/register.blade.php b/app/views/sentinel/swipe/sms/register.blade.php similarity index 100% rename from app/views/sentry/swipe/sms/register.blade.php rename to app/views/sentinel/swipe/sms/register.blade.php diff --git a/app/views/sentry/users/form.blade.php b/app/views/sentinel/users/form.blade.php similarity index 100% rename from app/views/sentry/users/form.blade.php rename to app/views/sentinel/users/form.blade.php diff --git a/app/views/sentry/users/index.blade.php b/app/views/sentinel/users/index.blade.php similarity index 100% rename from app/views/sentry/users/index.blade.php rename to app/views/sentinel/users/index.blade.php diff --git a/app/views/sentry/wait.blade.php b/app/views/sentinel/wait.blade.php similarity index 100% rename from app/views/sentry/wait.blade.php rename to app/views/sentinel/wait.blade.php diff --git a/app/views/template.blade.php b/app/views/template.blade.php index 85692802..ca57b984 100644 --- a/app/views/template.blade.php +++ b/app/views/template.blade.php @@ -62,7 +62,7 @@ @endif diff --git a/readme.md b/readme.md index 43e2b89f..66616c88 100644 --- a/readme.md +++ b/readme.md @@ -7,7 +7,7 @@ This is a basic demo showing some of the functionality of Sentinel on Laravel 4. ##### 1. Clone this repo: ``` -git clone git@github.com:cartalyst/demo-sentry.git +git clone git@github.com:cartalyst/demo-sentinel.git ``` ##### 2. Setup your virtual host.