<?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::post('/userregister', 'Api\AuthController@register');
Route::post('/userlogin', 'Api\AuthController@login');
Route::get('/introduction', 'Api\AuthController@introduction');
Route::post('/forgetpassword', 'Api\AuthController@forgetpassword');
Route::middleware('auth:api')->group(function () {
    Route::get('/category', 'Api\AuthController@category');
    Route::get('/subcategory/{category}', 'Api\AuthController@subcategory');//subcategory/1
    Route::get('/service', 'Api\AuthController@service');
    Route::get('/servicebycategory/{category}', 'Api\AuthController@servicebycategory');
    Route::get('/servicebysubcategory/{subcategory}', 'Api\AuthController@servicebysubcategory');
    Route::get('/questionsets/{service}', 'Api\AuthController@questionsets');
    Route::post('/subcategorysearch', 'Api\AuthController@subcategorysearch');
    Route::post('/servicesearch', 'Api\AuthController@servicesearch');
    Route::get('/skill', 'Api\AuthController@skill');
    Route::get('/skill/{service}', 'Api\AuthController@skillbyservice');
    Route::get('/myskill', 'Api\AuthController@myskill');
    Route::post('/addskill', 'Api\AuthController@addskill');
    Route::post('/validatepostalcode', 'Api\AuthController@validatepostalcode');
    Route::post('/searching', 'Api\AuthController@searching');
    Route::get('/contact', 'Api\AuthController@contact');
    Route::post('/contactdetails', 'Api\AuthController@contactdetails');
    Route::get('/mypostedservice', 'Api\AuthController@mypostedservice');
    Route::get('/mypostedservice/{servicerequest}', 'Api\AuthController@servicerequestdetail');
    Route::post('/makeproposal', 'Api\AuthController@makeproposal');
    Route::get('/getproposal/{servicerequest}', 'Api\AuthController@getproposal');
    Route::post('/fileupload', 'Api\AuthController@fileupload');
    Route::get('/myservice', 'Api\AuthController@myservice');
    Route::get('/searvicenearme', 'Api\AuthController@searvicenearme');
    Route::get('/myprofile', 'Api\AuthController@myprofile');
    Route::get('/providerdatail/{service}/{providerid}', 'Api\AuthController@providerdatail');
    Route::post('/addaddress', 'Api\AuthController@addaddress');
    Route::get('/addresslist', 'Api\AuthController@addresslist');
    Route::post('/acceptproposal', 'Api\AuthController@acceptproposal');
    Route::post('/editprofile', 'Api\AuthController@editprofile');
    Route::post('/changepassword', 'Api\AuthController@changepassword');
    Route::get('/disconnectaccount', 'Api\AuthController@disconnectaccount');
    Route::get('/deleteaccount', 'Api\AuthController@deleteaccount');
    Route::post('/editaddress', 'Api\AuthController@editaddress');
    Route::post('/payment', 'Api\AuthController@payment');
    Route::get('/notificationlist', 'Api\AuthController@notificationlist');
    Route::get('/myorder', 'Api\AuthController@myorder');
    Route::get('/providermyorder', 'Api\AuthController@providermyorder');
    Route::post('/addreview', 'Api\AuthController@addreview');
    Route::post('/vendorreview', 'Api\AuthController@vendorreview');
    Route::get('/updatenotificationstatus/{id}', 'Api\AuthController@updatenotificationstatus');
    Route::post('/subcategorynotification', 'Api\AuthController@subcategorynotification');

});

  Route::get('/sendnotification', 'Api\AuthController@sendnotification');
