Skip to content

Commit

Permalink
Add ninjas disk to filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdnbrk committed Oct 7, 2024
1 parent 6ebd73b commit 8b550ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/Models/Inscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;

Expand All @@ -27,9 +26,9 @@ protected function casts(): array

public function fullSvgExists(): bool
{
$filePath = resource_path('svg/ninjas/'.$this->getInternalCollectionId().'.svg');

if (File::exists($filePath)) {
if (Storage::disk('ninjas')->exists(
$this->getInternalCollectionId().'.svg'
)) {
return true;
}

Expand Down
7 changes: 7 additions & 0 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
'throw' => false,
],

'ninjas' => [
'driver' => 'local',
'root' => base_path('resources/svg/ninjas'),
'visibility' => 'private',
'throw' => false,
],

'ninja_components' => [
'driver' => 'local',
'root' => base_path('resources/svg/ninja_components'),
Expand Down

0 comments on commit 8b550ac

Please sign in to comment.