<?php

namespace App\Http\Controllers\Admin\API;

use Auth;
use Illuminate\Http\Request;

use App\Http\Modules\Admin\AdminRoleModule;

use App\Http\Controllers\Admin\BaseController;

class AdminRoleController extends BaseController
{
    public function __construct()
    {
        parent::__construct();
    }

    public function list(Request $request)
    {
    	$admin_role = AdminRoleModule::list($request);
    	return $admin_role;
    }

    public function show(Request $request, $hash_id)
    {
        $admin_role = AdminRoleModule::show($request, $hash_id);
        return $admin_role;
    }

    public function store(Request $request)
    {
        $admin_role = AdminRoleModule::store($request);
        return $admin_role;
    }

    public function update(Request $request, $hash_id)
    {
        $admin_role = AdminRoleModule::update($request, $hash_id);
        return $admin_role;
    }

    public function validCheck(Request $request, $hash_id = '')
    {
        $method = empty($hash_id) ? 'POST' :'PUT';
        $valid = AdminRoleModule::validCheck($request, $hash_id, $method);
        return $valid;
    }
}
