Skip to content

Commit

Permalink
Test branch1 at last (#3)
Browse files Browse the repository at this point in the history
* update the readme

* update app.json

* update app.json

* update app.json

* update app.json

* update app.json

* Update app.json

* update database config

* Update app.json

* Update app.json

* Update deploy.sh

* Update deploy.sh
  • Loading branch information
immortalize authored Mar 20, 2018
1 parent 501cb5a commit 4493381
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 12 deletions.
22 changes: 18 additions & 4 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,29 @@
"postdeploy": "bin/deploy.sh"
},
"env": {
"APP_DEBUG": {
"description": "xxx.",
"value": "true"
},
"APP_LOG_LEVEL": {
"description": "xxx.",
"value": "debug"
},
"APP_KEY": {
"description": "xxx.",
"value": "base64:7gPm4ka5+PrZA/bBiECersWKuG+wmmQC56uV0PJOhSM="
},
"DB_CONNECTION": {
"description": "xxx.",
"value": "pgsql"
}
},
"formation": {
},
"addons": [

],
"addons": ["heroku-postgresql:hobby-dev"],
"buildpacks": [
{
"url": "vendor/bin/heroku-php-apache2"
"url": "heroku/php"
}
]
}
2 changes: 1 addition & 1 deletion bin/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Sync database changes
php artisan migrate
php artisan migrate -n --force
18 changes: 14 additions & 4 deletions config/database.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?php

if($databaseUrl = getenv('DATABASE_URL')) {

$url = parse_url($databaseUrl);

$host = $url['host'];
$username = $url['user'];
$password = $url['pass'];
$database = substr($url['path'], 1);
}

return [

/*
Expand Down Expand Up @@ -68,11 +78,11 @@

'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', 'localhost'),
'host' => $host, //env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'database' => $database, // env('DB_DATABASE', 'forge'),
'username' => $username, // env('DB_USERNAME', 'forge'),
'password' => $password, // env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Life Coach helps its users to manage their goals and helps reaching them.

To achieve a goal, you need commitment, dedication and consistency.

Being the richest man in the cemetery doesn't matter to me. Going to bed at night saying we've done something wonderful, that's what matters to me.

Steve Jobs
4 changes: 1 addition & 3 deletions resources/views/sleep.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@
<tr>
<td class="table-text"><a href="{{ url('sleep/'.$sleep->id) }}"><div>{{ $sleep->begin_date }}</div><a/></td>
<td class="table-text"><a href="{{ url('sleep/'.$sleep->id) }}"><div>{{ $sleep->end_date }}</div></a></td>
<td>
{{ $sleep->duration }}
</td>
<td> {{ $sleep->duration }} </td>
<!-- user Delete Button -->
<td>
<form action="{{ url('sleep/'.$sleep->id) }}" method="POST">
Expand Down

0 comments on commit 4493381

Please sign in to comment.