<?php


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

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

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

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

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

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

});

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::post('/create', 'CreateAddressController@create')->name('create');

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

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

});

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

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

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

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

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

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

});