<?php
Route::middleware('is.admin')->group(function () {
    Route::group(['namespace' => 'Admin'], function() {
        // view    
        Route::view('/adminpanel', 'admin.adminpanel')->name('adminpanel');
        // api
        Route::group(['prefix' => 'api/admin'], function() {
            Route::get('/getUsers',
                       'adminController@getUsers');
            Route::put('/addUser',
                       'adminController@addUser');
        });
    });
});