diff --git a/composer.json b/composer.json
index 6cf675f..015b17d 100644
--- a/composer.json
+++ b/composer.json
@@ -10,6 +10,8 @@
}
],
"require": {
+ "igaster/laravel-theme": "2.0.6",
+ "orchestra/asset": "^3.6"
},
"require-dev": {
},
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..a75382c
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,6 @@
+* User Switch
+Add the following routes
+```
+Route::get( 'admin/switch/start/{id}', 'UserController@user_switch_start' );
+Route::get( 'admin/switch/stop', 'UserController@user_switch_stop' );
+```
diff --git a/resources/themes/adminlte/views/layouts/partials/scripts.blade.php b/resources/themes/adminlte/views/layouts/partials/scripts.blade.php
index b68e3f7..2418e71 100644
--- a/resources/themes/adminlte/views/layouts/partials/scripts.blade.php
+++ b/resources/themes/adminlte/views/layouts/partials/scripts.blade.php
@@ -9,5 +9,5 @@
Both of these plugins are recommended to enhance the
user experience. Slimscroll is required when using the
fixed layout. -->
-
-
+@js('site/js/jquery.slimscroll.min.js','jq.slimscroll');
+@js('site/js/fastclick.min.js','jq.fastclick');
\ No newline at end of file
diff --git a/src/Controllers/AdminController.php b/src/Controllers/AdminController.php
new file mode 100644
index 0000000..8b3c219
--- /dev/null
+++ b/src/Controllers/AdminController.php
@@ -0,0 +1,53 @@
+middleware('auth');
+ }
+
+ /**
+ * @todo Change the background color (or something) so we know we are switched
+ */
+ public function user_switch_start($id)
+ {
+ if ($this->switch_authorised())
+ {
+ $uo = User::find($id);
+
+ if (! $uo)
+ abort(404,'User not found');
+
+ Session::put('orig_user',Auth::id());
+ Auth::login($uo);
+ }
+
+ return Redirect::to('/home');
+ }
+
+ public function user_switch_stop()
+ {
+ if ($id = Session::pull('orig_user')) {
+ $uo = User::find($id);
+ Auth::login($uo);
+ }
+
+ return Redirect::to('/home');
+ }
+
+
+ public function switch_authorised()
+ {
+ // @todo
+ return TRUE;
+ }
+}