Skip to content
This repository was archived by the owner on Nov 9, 2020. It is now read-only.

Commit 81195a3

Browse files
committed
Fix validation across Laravel and Lumen
1 parent 24f7713 commit 81195a3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Http/Controllers/QueueController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public function show($queue)
2727
*/
2828
public function store(Request $request, $queue)
2929
{
30-
$request->validate([
30+
app('validator')->make($request->all(), [
3131
'job' => 'required',
3232
'data' => 'filled',
33-
]);
33+
])->validate();
3434

3535
$job = @unserialize($request->input('job'));
3636

tests/Http/Controllers/QueueControllerTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public function testStore()
2424
$payload = ['job' => serialize(new TestJob), 'data' => 'mydata'];
2525
$payload2 = ['job' => 'DoesNotExist'];
2626
$mock = Mockery::mock();
27-
$mock->shouldReceive('push')
28-
->once()
27+
$mock->shouldReceive('push')->once()
2928
->with(Mockery::type(TestJob::class), 'mydata', 'myqueue');
3029
Queue::shouldReceive('connection')->once()->andReturn($mock);
3130
$this->withoutMiddleware()

0 commit comments

Comments
 (0)