Created
February 11, 2017 07:25
-
-
Save evercode1/cc0878d63dce230a4d80a638320ba26d to your computer and use it in GitHub Desktop.
chapter 15 ApiController.php
This file contains hidden or 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
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| use App\Queries\GridQueries\GridQuery; | |
| use App\Queries\GridQueries\WidgetQuery; | |
| use App\Queries\GridQueries\MarketingImageQuery; | |
| use App\Queries\GridQueries\CategoryQuery; | |
| use App\Queries\GridQueries\SubcategoryQuery; | |
| class ApiController extends Controller | |
| { | |
| public function widgetData(Request $request) | |
| { | |
| return GridQuery::sendData($request, new WidgetQuery); | |
| } | |
| public function marketingImageData(Request $request) | |
| { | |
| return GridQuery::sendData($request, new MarketingImageQuery); | |
| } | |
| public function categoryData(Request $request) | |
| { | |
| return GridQuery::sendData($request, new CategoryQuery); | |
| } | |
| public function subcategoryData(Request $request) | |
| { | |
| return GridQuery::sendData($request, new SubcategoryQuery); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment