|
@@ -3,6 +3,7 @@
|
|
namespace App\Console\Commands;
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
use Illuminate\Console\Command;
|
|
use Illuminate\Console\Command;
|
|
|
|
+use App\Models\Article;
|
|
use App\Models\Author;
|
|
use App\Models\Author;
|
|
use App\Models\Book;
|
|
use App\Models\Book;
|
|
|
|
|
|
@@ -27,6 +28,11 @@ class LoadSampleData extends Command
|
|
*/
|
|
*/
|
|
public function handle()
|
|
public function handle()
|
|
{
|
|
{
|
|
|
|
+ $article = new Article;
|
|
|
|
+ $article->title = "Test article";
|
|
|
|
+ $article->content = "Test article contents";
|
|
|
|
+ $article->save();
|
|
|
|
+
|
|
$author = new Author;
|
|
$author = new Author;
|
|
$author->name = "Howard Johnson";
|
|
$author->name = "Howard Johnson";
|
|
$author->save();
|
|
$author->save();
|