add news post stuff to setup command
This commit is contained in:
parent
7c6a3eb4fa
commit
ceab147eb3
1 changed files with 13 additions and 0 deletions
|
@ -320,6 +320,19 @@ class SetupCommand extends Command
|
||||||
// Set the main rank to bot
|
// Set the main rank to bot
|
||||||
$botUser->setMainRank(config('rank.bot'));
|
$botUser->setMainRank(config('rank.bot'));
|
||||||
|
|
||||||
|
// Add a news category and post
|
||||||
|
$news_category_id = DB::table('news_categories')->insertGetId([
|
||||||
|
'category_name' => 'Site News',
|
||||||
|
'category_description' => 'News regarding the website',
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::table('news_posts')->insert([
|
||||||
|
'category_id' => $news_category_id,
|
||||||
|
'user_id' => $botUser->id,
|
||||||
|
'post_title' => 'Welcome to Sakura!',
|
||||||
|
'post_text' => "Hey! Thanks for installing Sakura, if you're here you probably don't need further instructions so have a good day.",
|
||||||
|
]);
|
||||||
|
|
||||||
$this->getLogger()->writeln("Success! You can now start a development server use the serve command for mahou.");
|
$this->getLogger()->writeln("Success! You can now start a development server use the serve command for mahou.");
|
||||||
$this->getLogger()->writeln("The default username and password are both railgun.");
|
$this->getLogger()->writeln("The default username and password are both railgun.");
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue