diff --git a/src/Lexers/ControllerLexer.php b/src/Lexers/ControllerLexer.php index 0081b213..dddcf98d 100644 --- a/src/Lexers/ControllerLexer.php +++ b/src/Lexers/ControllerLexer.php @@ -118,7 +118,7 @@ private function resourceTokens() return [ 'index' => [ 'query' => 'all:[plural]', - 'render' => '[singular].index with [plural]', + 'render' => '[singular].index with:[plural]', ], 'create' => [ 'render' => '[singular].create', diff --git a/tests/Feature/Lexers/ControllerLexerTest.php b/tests/Feature/Lexers/ControllerLexerTest.php index a19bea86..24e5a769 100644 --- a/tests/Feature/Lexers/ControllerLexerTest.php +++ b/tests/Feature/Lexers/ControllerLexerTest.php @@ -46,7 +46,7 @@ public function it_returns_controllers(): void 'PostController' => [ 'index' => [ 'query' => 'all:posts', - 'render' => 'post.index with posts', + 'render' => 'post.index with:posts', ], 'show' => [ 'find' => 'id', @@ -63,7 +63,7 @@ public function it_returns_controllers(): void $this->statementLexer->shouldReceive('analyze') ->with([ 'query' => 'all:posts', - 'render' => 'post.index with posts', + 'render' => 'post.index with:posts', ]) ->andReturn(['index-statement-1', 'index-statement-2']); @@ -120,7 +120,7 @@ public function it_returns_a_web_resource_controller(): void $this->statementLexer->shouldReceive('analyze') ->with([ 'query' => 'all:comments', - 'render' => 'comment.index with comments', + 'render' => 'comment.index with:comments', ]) ->andReturn(['index-statements']); @@ -265,7 +265,7 @@ public function it_returns_a_specific_resource_controller(): void $this->statementLexer->expects('analyze') ->with([ 'query' => 'all:users', - 'render' => 'user.index with users', + 'render' => 'user.index with:users', ]) ->andReturn(['index-statements']);