Created
January 23, 2016 15:24
-
-
Save prio101/613680a1f70ebb6550ea to your computer and use it in GitHub Desktop.
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\Api\V1; | |
| use Illuminate\Http\Request; | |
| use App\Http\Requests; | |
| use App\Http\Controllers\Controller; | |
| use Psy\Util\Json; | |
| use App\Model\BookingsModel; | |
| class ApiController extends Controller | |
| { | |
| /** | |
| * Display a listing of the Bookings data. | |
| * | |
| * @return Json | |
| * | |
| */ | |
| public function bookingsApi(BookingsModel $bookings){ | |
| $allBookingsList = $bookings->allBookingsListing(); | |
| return response()->json($allBookingsList); | |
| } | |
| } | |
| ########################################## | |
| #And Routes | |
| #API Version 1.0 | |
| ########################################## | |
| Route::group(['prefix'=>'api/v1', 'namespace' => 'Api\V1' ] , function(){ | |
| Route::GET('/bookings' , 'ApiController@bookingsApi'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment