|
@@ -0,0 +1,91 @@
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+namespace App\Console\Commands;
|
|
|
|
+
|
|
|
|
+use Illuminate\Console\Command;
|
|
|
|
+use App\Models\Author;
|
|
|
|
+use App\Models\Book;
|
|
|
|
+
|
|
|
|
+class LoadSampleData extends Command
|
|
|
|
+{
|
|
|
|
+ /**
|
|
|
|
+ * The name and signature of the console command.
|
|
|
|
+ *
|
|
|
|
+ * @var string
|
|
|
|
+ */
|
|
|
|
+ protected $signature = 'app:load-sample-data';
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * The console command description.
|
|
|
|
+ *
|
|
|
|
+ * @var string
|
|
|
|
+ */
|
|
|
|
+ protected $description = 'Command description';
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Execute the console command.
|
|
|
|
+ */
|
|
|
|
+ public function handle()
|
|
|
|
+ {
|
|
|
|
+ $author = new Author;
|
|
|
|
+ $author->name = "Howard Johnson";
|
|
|
|
+ $author->save();
|
|
|
|
+
|
|
|
|
+ $book = new Book;
|
|
|
|
+ $book->name = "High-Speed Digital Design: A Handbook of Black Magic";
|
|
|
|
+ $book->isbn = "9780133957242";
|
|
|
|
+ $book->year = 1993;
|
|
|
|
+ $book->pagecount = 446;
|
|
|
|
+ $book->author_id = $author->id;
|
|
|
|
+ $book->annotation = "Focuses on a combination of digital and analog circuit theory. Helps engineers who work with digital systems, shorten their product development cycles and fix their latest high-speed design problems. DLC: Digital electronics.";
|
|
|
|
+ $book->save();
|
|
|
|
+
|
|
|
|
+ $author = new Author;
|
|
|
|
+ $author->name = "Харкевич А.А.";
|
|
|
|
+ $author->save();
|
|
|
|
+
|
|
|
|
+ $book = new Book;
|
|
|
|
+ $book->name = "Основы радиотехники";
|
|
|
|
+ $book->isbn = "978-5-9221-0790-7";
|
|
|
|
+ $book->year = 2007;
|
|
|
|
+ $book->pagecount = 512;
|
|
|
|
+ $book->author_id = $author->id;
|
|
|
|
+ $book->annotation = "В курс теоретических основ радиотехники вошли: общие вопросы передачи и приема сигналов, исследование прохождения электрических сигналов через внутренние цепи аппаратуры и распространения сигналов по линиям и волноводам, исследование основных радиотехнических процессов. Математический аппарат курса включает решение линейных дифференциальных уравнений с постоянными и переменными коэффициентами и решение нелинейных дифференциальных уравнений. Настоящее издание полностью воспроизводит текст издания 1962 года, которое было допущено Министерством высшего и среднего специального образования СССР в качестве учебного пособия для высших учебных заведений СССР.";
|
|
|
|
+ $book->save();
|
|
|
|
+
|
|
|
|
+ $author = new Author;
|
|
|
|
+ $author->name = "Allen Downey";
|
|
|
|
+ $author->save();
|
|
|
|
+
|
|
|
|
+ $book = new Book;
|
|
|
|
+ $book->name = "Think DSP";
|
|
|
|
+ $book->isbn = "978-1491938454";
|
|
|
|
+ $book->year = 2016;
|
|
|
|
+ $book->pagecount = 153;
|
|
|
|
+ $book->author_id = $author->id;
|
|
|
|
+ $book->annotation = "If you understand basic mathematics and know how to program with Python, you're ready to dive into signal processing. While most resources start with theory to teach this complex subject, this practical book introduces techniques by showing you how they're applied in the real world. In the first chapter alone, you'll be able to decompose a sound into its harmonics, modify the harmonics, and generate new sounds.";
|
|
|
|
+ $book->save();
|
|
|
|
+
|
|
|
|
+ $book = new Book;
|
|
|
|
+ $book->name = "Think Stats";
|
|
|
|
+ $book->isbn = "978-1491907337";
|
|
|
|
+ $book->year = 2014;
|
|
|
|
+ $book->pagecount = 264;
|
|
|
|
+ $book->author_id = $author->id;
|
|
|
|
+ $book->annotation = "If you know how to program, you have the skills to turn data into knowledge, using tools of probability and statistics. This concise introduction shows you how to perform statistical analysis computationally, rather than mathematically, with programs written in Python.";
|
|
|
|
+ $book->save();
|
|
|
|
+
|
|
|
|
+ $author = new Author;
|
|
|
|
+ $author->name = "Robert Lucky";
|
|
|
|
+ $author->save();
|
|
|
|
+
|
|
|
|
+ $book = new Book;
|
|
|
|
+ $book->name = "Silicon Dreams: Information, Man, and Machine";
|
|
|
|
+ $book->isbn = "9780312029609";
|
|
|
|
+ $book->year = 1989;
|
|
|
|
+ $book->pagecount = 440;
|
|
|
|
+ $book->author_id = $author->id;
|
|
|
|
+ $book->annotation = "Silicon Dreams is a highly informed discussion of the new information age, from the Executive Director of Research at Bell Labs. Robert Lucky addresses such questions as what information is, how it is generated, captured, stored, and communicated, and goes on to explain information theory, cryptology, speech synthesis and recognition, and much more. Charts, diagrams, photographs.";
|
|
|
|
+ $book->save();
|
|
|
|
+ }
|
|
|
|
+}
|