hypothetical/routes/api.php

36 lines
1.1 KiB
PHP
Raw Normal View History

2016-08-19 16:38:49 -04:00
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::middleware('auth:api')->get('/user', function(Request $request) {
2016-08-19 16:38:49 -04:00
return $request->user();
2017-01-26 19:17:37 -05:00
});
/*
|--------------------------------------------------------------------------
| Get Routes
|--------------------------------------------------------------------------
*/
Route::get('/blog-entries', 'ApiController@getBlogEntries');
/*
|--------------------------------------------------------------------------
| Post Routes
|--------------------------------------------------------------------------
*/
Route::post('/contact-submit', 'ApiController@postContactSubmit');
Route::post('/subscription-submit', 'ApiController@postSubscriptionSubmit');