-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from P3D-Legacy/develop
- Loading branch information
Showing
62 changed files
with
5,479 additions
and
1,011 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 0 additions & 86 deletions
86
app/Console/Commands/SyncGameSaveGamejoltAccountTrophies.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use App\Jobs\SyncGameSaveGamejoltAccountTrophies; | ||
use App\Models\User; | ||
use Illuminate\Console\Command; | ||
|
||
class SyncGameSaveTrophies extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'sync:gamesavetrophies {user_id=all}'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Sync trophies from the GameJolt API with the users game save'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return int | ||
*/ | ||
public function handle() | ||
{ | ||
$argument = $this->argument('user_id'); | ||
if ($argument != 'all') { | ||
if (! is_numeric($argument) || $argument < 1) { | ||
$this->error('User ID must be numeric'); | ||
|
||
return Command::FAILURE; | ||
} | ||
} | ||
|
||
if ($argument == 'all') { | ||
$users = User::all(); | ||
foreach ($users as $user) { | ||
SyncGameSaveGamejoltAccountTrophies::dispatch($user); | ||
} | ||
} else { | ||
$user = User::find($argument); | ||
if (! $user) { | ||
$this->error('User not found'); | ||
|
||
return Command::FAILURE; | ||
} | ||
SyncGameSaveGamejoltAccountTrophies::dispatch($user); | ||
} | ||
|
||
return Command::SUCCESS; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace App\Http\Livewire\Profile\GameSave; | ||
|
||
use Livewire\Component; | ||
|
||
class Details extends Component | ||
{ | ||
public $gamesave; | ||
|
||
public $details; | ||
|
||
public function mount($gamesave) | ||
{ | ||
$this->gamesave = $gamesave; | ||
$this->details = []; | ||
} | ||
|
||
public function loadData() | ||
{ | ||
$this->details = $this->gamesave->getPlayerDataDetails(); | ||
} | ||
|
||
public function render() | ||
{ | ||
return view('livewire.profile.game-save.details'); | ||
} | ||
} |
Oops, something went wrong.