aboutsummaryrefslogtreecommitdiff
path: root/src/CamilStaps/BotleaguesApi/BotleaguesApiServiceProvider.php
diff options
context:
space:
mode:
authorCamil Staps2015-02-21 21:42:43 +0100
committerCamil Staps2015-02-21 21:42:43 +0100
commitb7d7f5b90e373329e8b5b9a8aa5f6879834f076e (patch)
treeadf8b5575e3e3b1bf7b864042b1e94420297bc24 /src/CamilStaps/BotleaguesApi/BotleaguesApiServiceProvider.php
parentBasic controllers and authentication (diff)
trying to get auth work
Diffstat (limited to 'src/CamilStaps/BotleaguesApi/BotleaguesApiServiceProvider.php')
-rw-r--r--src/CamilStaps/BotleaguesApi/BotleaguesApiServiceProvider.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/CamilStaps/BotleaguesApi/BotleaguesApiServiceProvider.php b/src/CamilStaps/BotleaguesApi/BotleaguesApiServiceProvider.php
index 76debfd..a13972c 100644
--- a/src/CamilStaps/BotleaguesApi/BotleaguesApiServiceProvider.php
+++ b/src/CamilStaps/BotleaguesApi/BotleaguesApiServiceProvider.php
@@ -1,8 +1,11 @@
<?php
namespace CamilStaps\BotleaguesApi;
-use \Illuminate\Support\ServiceProvider;
use \Illuminate\Database\Eloquent\ModelNotFoundException;
+use \Illuminate\Support\ServiceProvider;
+use \Illuminate\Support\Facades\Hash;
+use \Illuminate\Support\Facades\Config;
+use \Illuminate\Support\Facades\Auth;
use \Dingo\Api\Facade\API;
use Response;
@@ -22,13 +25,20 @@ class BotleaguesApiServiceProvider extends ServiceProvider {
*/
public function boot()
{
- $this->package('camil-staps/botleagues-api');
+ $this->package('camil-staps/botleagues-api', null, __DIR__.'/../..');
+
+ include __DIR__ . '/../../routes.php';
API::error(function(ModelNotFoundException $e) {
return Response::make(['error' => 'Resource not found'], 404);
});
- include __DIR__ . '/../../routes.php';
+// var_dump(Auth::logout());
+ var_dump(Auth::check());
+// var_dump(Auth::attempt(array('email' => 'camilstaps', 'password' => 'secret')));
+
+// var_dump(Config::get('auth'));
+// var_dump(Config::get('botleagues-api'));
}
/**
@@ -40,7 +50,7 @@ class BotleaguesApiServiceProvider extends ServiceProvider {
{
$this->app->register('Dingo\Api\Provider\ApiServiceProvider');
-
+
}
/**