<?php

namespace App\Http\Controllers\Admin\Api;

use Auth;
use Illuminate\Http\Request;

use App\Http\Modules\Admin\AdminModule;

use App\Http\Controllers\Admin\BaseController;

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

    public function self(Request $request)
    {
    	$self = AdminModule::self($request);
    	return $self;
    }

    public function list(Request $request)
    {
    	$admin = AdminModule::list($request);
    	return $admin;
    }

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

    public function store(Request $request)
    {
        $admin = AdminModule::store($request);
        return $admin;
    }

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

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