Skip to content

Commit

Permalink
Merge d63c91d into b333dda
Browse files Browse the repository at this point in the history
  • Loading branch information
michalstrzelecki committed Mar 15, 2017
2 parents b333dda + d63c91d commit f0b2e32
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ Starting platform_web_server_1
```
./develop artisan migrate
```

- Create laravel passport oauth keys & db entries

```
./develop artisan passport:client --personal
./develop artisan passport:client --password
```

- You can also seed database with example data using this command

Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
],
"post-create-project-cmd": [
"php artisan key:generate",
"php artisan passport:keys",
"php artisan vendor:publish --tag=public --force --provider=\"Gzero\\Admin\\ServiceProvider\""
],
"post-install-cmd": [
Expand Down
43 changes: 43 additions & 0 deletions database/migrations/2017_03_09_134604_passport_create_clients.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Migrations\Migration;

class PassportCreateClients extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Artisan::call('passport:client', [
'--password' => true,
'--name' => 'Password Grant Client'
]);

Artisan::call('passport:client', [
'--personal' => true,
'--name' => 'Personal Access Client'
]);
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
if (Schema::hasTable('oauth_clients')) {
DB::table('oauth_clients')
->where('name', 'Password Grant Client')
->delete();

DB::table('oauth_clients')
->where('name', 'Personal Access Client')
->delete();
}
}
}

0 comments on commit f0b2e32

Please sign in to comment.