<?php

use Illuminate\Support\Facades\Route;


Route::group(['prefix' => 'address', 'as' => 'address.', 'namespace' => 'Addresses'], function () {

    Route::get('/{id}/show', 'FetchAddressController@fetch')->name('show');

    Route::get('/list', 'ListAddressesController@list')->name('list');

    Route::get('district/list', 'ListDistrictsController@list')->name('district.list');

    Route::post('/create', 'CreateAddressController@create')->name('create');

    Route::put('/update/{id}', 'UpdateAddressController@update')->name('update');

    Route::put('/{id}/default', 'SetAddressToDefaultController@update')->name('default');

    Route::delete('/delete/{id}', 'DeleteAddressController@destroy')->name('delete');

});

    Route::group(['prefix' => 'service_type', 'as' => 'service_type.', 'namespace' => 'ServiceTypes'], function () {

    Route::get('/{id}/show', 'FetchServiceTypeController@fetch')->name('show');

    Route::get('/list', 'ListServiceTypesController@list')->name('list');

    Route::post('/create', 'CreateServiceTypeController@create')->name('create');

    Route::put('/update/{id}', 'UpdateServiceTypeController@update')->name('update');

    Route::put('/status/{id}/{status}', 'UpdateServiceTypeStatusController@activate')->where('status', 'active|inactive')->name('status');

    Route::delete('/delete/{id}', 'DeleteServiceTypeController@destroy')->name('delete');

});
