Skip to content

Commit

Permalink
Merge pull request #8 from etanasia/master
Browse files Browse the repository at this point in the history
add api_token esa
  • Loading branch information
andri-sudarmawijaya authored Dec 11, 2017
2 parents 3047905 + 514dff0 commit f6d1948
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/controller/ApiManagerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ public function store(Request $request)
->withInput();
}

$token = $this->token();
$api = New ApiManager;
$api->client = str_replace(array('https://', 'http://'), array('',''),$request->input('client'));
$api->api_keys = $this->token();
$api->api_keys = $token;
$api->api_token = $token;
// $api->api_keys = $this->token();
$api->description = $request->input('description');
$api->user_id = 1;
$api->save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function up()
$table->string('user_id', 100);
$table->string('client', 225);
$table->string('api_keys', 255);
$table->string('api_token', 255);
$table->text('description');
$table->integer('is_published')->default('1');
});
Expand All @@ -29,4 +30,4 @@ public function down()
{
Schema::drop('api_manager');
}
}
}

0 comments on commit f6d1948

Please sign in to comment.