Skip to content

Commit a661e13

Browse files
author
andy3471
committed
Merge branch 'release/1.1.2'
2 parents eaa3a64 + 4d58a1e commit a661e13

File tree

19 files changed

+103
-156
lines changed

19 files changed

+103
-156
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Homestead.yaml
1111
npm-debug.log
1212
yarn-error.log
1313
/.vagrant
14+
/public/images/logo_override.png
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
namespace App\Console\Commands;
4+
5+
use Illuminate\Console\Command;
6+
7+
class DemoModeRefresh extends Command
8+
{
9+
/**
10+
* The name and signature of the console command.
11+
*
12+
* @var string
13+
*/
14+
protected $signature = 'demo:refresh';
15+
16+
/**
17+
* The console command description.
18+
*
19+
* @var string
20+
*/
21+
protected $description = 'Refresh Database if the site is in demo mode';
22+
23+
/**
24+
* Create a new command instance.
25+
*
26+
* @return void
27+
*/
28+
public function __construct()
29+
{
30+
parent::__construct();
31+
}
32+
33+
/**
34+
* Execute the console command.
35+
*
36+
* @return mixed
37+
*/
38+
public function handle()
39+
{
40+
if (config('app.demo_mode')) {
41+
$this->call('migrate:fresh', ['--seed' => true]);
42+
};
43+
}
44+
}

app/Console/Kernel.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ class Kernel extends ConsoleKernel
2424
*/
2525
protected function schedule(Schedule $schedule)
2626
{
27-
// $schedule->command('inspire')
28-
// ->hourly();
27+
$schedule->command('demo:refresh')->daily();
2928
}
3029

3130
/**

app/Http/Controllers/GamesController.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,18 @@ public function show($id)
4040
->with('platform', 'createduser')
4141
->get();
4242

43+
$dlcCount = DB::table('dlcs')
44+
->distinct()
45+
->selectRaw('dlcs.id, dlcs.name, concat("/", dlcs.image) as image, concat("/games/dlc/", dlcs.id) as url')
46+
->join('keys', 'keys.dlc_id', '=', 'dlcs.id')
47+
->where('keys.owned_user_id', '=', null)
48+
->where('keys.removed', '=', '0')
49+
->where('keys.game_id', '=', $id)
50+
->count();
51+
4352
$dlcurl = "/games/dlc/get/" . $id;
4453

45-
return view('games.show')->withGame($game)->withKeys($keys)->withDlcurl($dlcurl);
54+
return view('games.show')->withGame($game)->withKeys($keys)->withDlcurl($dlcurl)->withDlcCount($dlcCount);
4655
}
4756

4857
public function edit($id)

database/seeds/UsersTableSeeder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ public function run()
1414
{
1515
factory(App\User::class)->make([
1616
'email' => '[email protected]',
17-
'admin' => '1'
18-
]);
17+
'admin' => '1',
18+
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi'
19+
])->save();
1920

2021
factory(App\User::class, 20)->create();
2122
}

package-lock.json

Lines changed: 19 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"vue-template-compiler": "^2.6.11"
2525
},
2626
"dependencies": {
27+
"andyh-autocomplete": "^1.0.2",
2728
"vue-infinite-loading": "^2.4.4"
2829
}
2930
}

public/css/app.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/images/LogoWeb.png

-13.6 KB
Binary file not shown.

public/images/logo_default.png

21.6 KB
Loading

0 commit comments

Comments
 (0)