Skip to content

Commit

Permalink
settings controller working and can now overwrite configuration from …
Browse files Browse the repository at this point in the history
…database
  • Loading branch information
roncodes committed Jun 8, 2023
1 parent 77bc9e7 commit 99713f2
Show file tree
Hide file tree
Showing 12 changed files with 432 additions and 186 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fleetbase/core-api",
"version": "1.0.3-alpha",
"version": "1.0.4-alpha",
"description": "Core Framework and Resources for Fleetbase API",
"keywords": [
"fleetbase",
Expand Down
28 changes: 0 additions & 28 deletions config/mail.mailers.php

This file was deleted.

85 changes: 0 additions & 85 deletions config/queue.connections.php

This file was deleted.

5 changes: 0 additions & 5 deletions src/Casts/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ public static function decode($json)
}

$json = stripslashes($json);

if (Str::startsWith($json, '"') && Str::endsWith($json, '"')) {
$json = trim($json, '"');
}

return json_decode($json, true);
}
}
14 changes: 0 additions & 14 deletions src/Events/ResourceLifecycleEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,6 @@ class ResourceLifecycleEvent implements ShouldBroadcast
*/
public array $data = [];

/**
* The name of the queue connection to use when broadcasting the event.
*
* @var string
*/
public string $connection = 'events';

/**
* The name of the queue to use when broadcasting the event.
*
* @var string
*/
public string $queue = 'events';

/**
* Create a new lifecycle event instance.
*
Expand Down
6 changes: 3 additions & 3 deletions src/Http/Controllers/Internal/v1/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class FileController extends FleetbaseController
*/
public function upload(UploadFileRequest $request)
{
$disk = env('FILESYSTEM_DRIVER');
$disk = $request->input('disk', config('filesystems.default'));
$type = $request->input('type');
$size = $request->input('file_size', $request->file->getSize());
$path = $request->input('path', 'uploads');
Expand Down Expand Up @@ -87,7 +87,7 @@ public function upload(UploadFileRequest $request)
*/
public function uploadBase64(UploadBase64FileRequest $request)
{
$disk = env('FILESYSTEM_DRIVER');
$disk = $request->input('disk', config('filesystems.default'));
$data = $request->input('data');
$path = $request->input('path', 'uploads');
$visibility = $request->input('visibility', 'public');
Expand Down Expand Up @@ -145,7 +145,7 @@ public function uploadBase64(UploadBase64FileRequest $request)
*/
public function download(?string $id, DownloadFileRequest $request)
{
$disk = env('FILESYSTEM_DRIVER');
$disk = $request->input('disk', config('filesystems.default'));
$file = File::where('uuid', $id)->first();

return Storage::disk($disk)->download($file->path, $file->name);
Expand Down
Loading

0 comments on commit 99713f2

Please sign in to comment.