Commit fe82e855 authored by Mohammad Javad Ghasemy's avatar Mohammad Javad Ghasemy 🦈

search by isbn Api Done :)

parent cab8bcc7
<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use BookByISBN\Ketabir;
use BookByISBN\OpacNlai;
use Illuminate\Http\Request;
class SearchBookByIsbn extends Controller
{
/**
* Handle the incoming request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function __invoke($_ISBN)
{
$ketabir = new Ketabir();
$book_picture = $ketabir->get_book_picture_by_isbn($_ISBN);
$opac_nlai = new OpacNlai();
$book_detail = $opac_nlai->get_book_detail($_ISBN);
return [
"ok" => true,
"picture" => $book_picture,
"detail" => $book_detail
];
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment