<?php


namespace App\Http\Middleware;

class apichecker
{
	public function handle($request, \Closure $next)
	{
		$api_key = $request->api_key;

		if (!setting_item_value($api_key)) {
			return response()->json(['status' => 'error', 'message' => 'Invalid Api Token']);
		}

		return $next($request);
	}
}

?>