-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'CollectiveDesign-feature/options'
- Loading branch information
Showing
28 changed files
with
696 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Whitecube\NovaPage\Http\Controllers\Option; | ||
|
||
use Illuminate\Routing\Controller; | ||
use Whitecube\NovaPage\Pages\Manager; | ||
use Laravel\Nova\Http\Requests\ResourceIndexRequest; | ||
|
||
class CountController extends Controller | ||
{ | ||
/** | ||
* Get the resource count for a given query. | ||
* | ||
* @param \Laravel\Nova\Http\Requests\ResourceIndexRequest $request | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function show(ResourceIndexRequest $request, Manager $manager) | ||
{ | ||
return response()->json([ | ||
'count' => $manager->queryResourcesCount($request, 'option') | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Whitecube\NovaPage\Http\Controllers\Option; | ||
|
||
use Whitecube\NovaPage\Pages\Manager; | ||
use Laravel\Nova\Http\Requests\ResourceIndexRequest; | ||
use Whitecube\NovaPage\Http\Controllers\ResourceIndexController; | ||
|
||
class IndexController extends ResourceIndexController | ||
{ | ||
/** | ||
* Resource label callback | ||
* | ||
* @return string | ||
*/ | ||
protected function resourceLabel() { | ||
return config('novapage.labels.options'); | ||
} | ||
|
||
/** | ||
* Callback to retrieve the resource index items | ||
* | ||
* @param \Laravel\Nova\Http\Requests\ResourceIndexRequest $request | ||
* @param \Whitecube\NovaPage\Pages\Manager $manager | ||
* @return \Illuminate\Support\Collection | ||
*/ | ||
protected function resourceIndexItems(ResourceIndexRequest $request, Manager $manager) { | ||
return $manager->queryIndexResources($request, 'option'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Whitecube\NovaPage\Http\Controllers\Option; | ||
|
||
use Whitecube\NovaPage\Http\Controllers\ResourceUpdateController; | ||
|
||
class UpdateController extends ResourceUpdateController | ||
{ | ||
/** | ||
* The queried resource's name | ||
* | ||
* @var string | ||
*/ | ||
protected $resourceName = 'nova-option'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Whitecube\NovaPage\Http\Controllers\Page; | ||
|
||
use Whitecube\NovaPage\Pages\Manager; | ||
use Laravel\Nova\Http\Requests\ResourceIndexRequest; | ||
use Whitecube\NovaPage\Http\Controllers\ResourceIndexController; | ||
|
||
class IndexController extends ResourceIndexController | ||
{ | ||
/** | ||
* Resource label callback | ||
* | ||
* @return string | ||
*/ | ||
protected function resourceLabel() { | ||
return config('novapage.labels.pages'); | ||
} | ||
|
||
/** | ||
* Callback to retrieve the resource index items | ||
* | ||
* @param \Laravel\Nova\Http\Requests\ResourceIndexRequest $request | ||
* @param \Whitecube\NovaPage\Pages\Manager $manager | ||
* @return \Illuminate\Support\Collection | ||
*/ | ||
protected function resourceIndexItems(ResourceIndexRequest $request, Manager $manager) { | ||
return $manager->queryIndexResources($request, 'route'); | ||
} | ||
} |
Oops, something went wrong.