public function addResource(Request $request)
{
$url = $request->post('url');
$result = $this->service->saveContent($url);
if ($result !== null) {
return response()->json(['status' => 'ok', 'message' => 'Url has been added', 'data' => $result]);
}
return response()->json(['status' => 'error', 'message' => 'Error', 'data' => ['url' => $url]]);
}