first commit

This commit is contained in:
Tyler
2020-12-21 02:09:34 -05:00
commit 2802973d3f
113 changed files with 30356 additions and 0 deletions

View File

@ -0,0 +1,44 @@
<?php
namespace App\Console\Commands;
use App\Services\BookInformation\GoogleBooks;
use Illuminate\Console\Command;
class TestLookup extends Command {
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'lookup {isbn}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Lookup an item by isbn';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct() {
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle() {
$isbn = $this->argument('isbn');
$bn = new GoogleBooks();
print_r($bn->lookup($isbn));
}
}

40
app/Console/Kernel.php Normal file
View File

@ -0,0 +1,40 @@
<?php
namespace App\Console;
use App\Console\Commands\TestLookup;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel {
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
TestLookup::class
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule) {
// $schedule->command('inspire')
// ->hourly();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands() {
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}