Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Repositories/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public static function __callStatic($method, $parameters)
* Defining custom roues.
* The prefix of this route is the uriKey (e.g. 'restify-api/orders'),
* The namespace is Http/Controllers
* Middlewares are the same from config('restify.middleware')
* Middlewares are the same from config('restify.middleware').
*
* However all options could be customized by passing an $options argument
*
Expand Down
4 changes: 2 additions & 2 deletions src/RestifyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function customDefinitions()
{
collect(Restify::$repositories)->each(function ($repository) {
$config = [
'namespace' => trim(app()->getNamespace(), '\\') . '\Http\Controllers',
'namespace' => trim(app()->getNamespace(), '\\').'\Http\Controllers',
'as' => '',
'prefix' => Restify::path($repository::uriKey()),
'middleware' => config('restify.middleware', []),
Expand Down Expand Up @@ -76,7 +76,7 @@ public function customDefinitions()
public function defaultRoutes($config)
{
Route::group($config, function () {
$this->loadRoutesFrom(__DIR__ . '/../routes/api.php');
$this->loadRoutesFrom(__DIR__.'/../routes/api.php');
});

return $this;
Expand Down
1 change: 0 additions & 1 deletion tests/Fixtures/RepositoryWithRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Routing\Router;

/**
* @package Binaryk\LaravelRestify\Tests\Fixtures;
* @author Eduard Lupacescu <eduard.lupacescu@binarcode.com>
*/
class RepositoryWithRoutes extends Repository
Expand Down
9 changes: 4 additions & 5 deletions tests/RepositoryWithRoutesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Illuminate\Routing\Router;

/**
* @package Binaryk\LaravelRestify\Tests;
* @author Eduard Lupacescu <eduard.lupacescu@binarcode.com>
*/
class RepositoryWithRoutesTest extends IntegrationTest
Expand All @@ -28,7 +27,7 @@ protected function setUp(): void

public function test_can_add_custom_routes()
{
$this->get(Restify::path(RepositoryWithRoutes::uriKey()) . '/testing')->assertStatus(200)
$this->get(Restify::path(RepositoryWithRoutes::uriKey()).'/testing')->assertStatus(200)
->assertJson([
'success' => true,
]);
Expand Down Expand Up @@ -62,7 +61,6 @@ public function test_can_use_custom_namespace()
],
]);
}

}

class WithCustomPrefix extends RepositoryWithRoutes
Expand Down Expand Up @@ -109,9 +107,10 @@ public static function routes(Router $router, $options = [
}
}

class HandleController extends RestController {
class HandleController extends RestController
{
/**
* Just saying hello
* Just saying hello.
*
* @return \Binaryk\LaravelRestify\Controllers\RestResponse
*/
Expand Down