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

Commit c7967d6

Browse files
committed
Refactor
1 parent 24e1bb7 commit c7967d6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
],
2323
"require": {
2424
"php": "^7.4",
25-
"illuminate/support": "^6.0 || ^7.0",
25+
"illuminate/bus": "^6.0 || ^7.0",
26+
"illuminate/queue": "^6.0 || ^7.0",
27+
"illuminate/http": "^6.0 || ^7.0",
28+
"illuminate/validation": "^6.0 || ^7.0",
2629
"theiconic/php-ga-measurement-protocol": "^2.7"
2730
},
2831
"require-dev": {

src/Http/StoreClientIdInSession.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22

33
namespace ProtoneMedia\AnalyticsEventTracking\Http;
44

5-
use Illuminate\Foundation\Validation\ValidatesRequests;
65
use Illuminate\Http\Request;
76

87
class StoreClientIdInSession
98
{
10-
use ValidatesRequests;
11-
129
public function __invoke(Request $request, ClientIdSession $clientIsSession)
1310
{
14-
$this->validate($request, ['id' => 'required']);
11+
$data = $request->validate(['id' => 'required']);
1512

16-
$clientIsSession->update($request->input('id'));
13+
$clientIsSession->update($data['id']);
1714

1815
return response()->json();
1916
}

0 commit comments

Comments
 (0)