Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit 855b597

Browse files
committed
Move settings to a standalone package, fix namespaces
1 parent b786a6e commit 855b597

File tree

6 files changed

+7
-48
lines changed

6 files changed

+7
-48
lines changed

src/Api/SettingsApiController.php

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/Api/UserApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace App\Api\V1\Controllers;
3+
namespace Saritasa\Laravel\Controllers\Api;
44

55
use App\Models\User;
66
use Dingo\Api\Http\Request;

src/Responses/AddressDTO.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,4 @@ class AddressDTO extends DtoModel
1212
protected $city;
1313
protected $state;
1414
protected $zip;
15-
16-
function __construct(Preference $preferences)
17-
{
18-
$this->name = $preferences->shipping_name;
19-
$this->address = $preferences->shipping_street_address;
20-
$this->city = $preferences->shipping_city;
21-
$this->state = $preferences->shipping_state;
22-
$this->zip = $preferences->shipping_zip_code;
23-
}
2415
}

src/Responses/AuthSuccessDTO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace App\Api\V1\Responses;
3+
namespace Saritasa\Laravel\Controllers\Responses;
44

55
class AuthSuccessDTO extends DtoModel {
66

src/Responses/NotificationSettingDTO.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<?php
22

3-
namespace App\Api\V1\Responses;
3+
namespace Saritasa\Laravel\Controllers\Responses;
44

5+
use App\Models\NotificationSetting;
56
use App\Models\NotificationType;
7+
use Saritasa\Transformers\DtoModel;
68

79
class NotificationSettingDTO extends DtoModel
810
{
@@ -12,7 +14,7 @@ class NotificationSettingDTO extends DtoModel
1214

1315
protected static $collectionKey = 'settings';
1416

15-
function __construct($userSetting, NotificationType $notificationType)
17+
function __construct(NotificationSetting $userSetting, NotificationType $notificationType)
1618
{
1719
$this->id = $notificationType->id;
1820
$this->name = $notificationType->name;

src/Web/IWebResourceController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace App\Http\Controllers\Base;
3+
namespace Saritasa\Laravel\Controllers\Web;
44

55
use Illuminate\Contracts\View\View;
66
use Illuminate\Http\JsonResponse;

0 commit comments

Comments
 (0)