diff --git a/Updated_Cms/database/seeders/WebsiteArticleSeeder.php b/Updated_Cms/database/seeders/WebsiteArticleSeeder.php index af9bb8999b..5ff23be592 100644 --- a/Updated_Cms/database/seeders/WebsiteArticleSeeder.php +++ b/Updated_Cms/database/seeders/WebsiteArticleSeeder.php @@ -17,13 +17,14 @@ class WebsiteArticleSeeder extends Seeder $title = 'Atom CMS has been installed'; $slug = Str::slug($title); + $user = User::query()->firstOrFail(); WebsiteArticle::query()->firstOrCreate(['slug' => $slug], [ 'slug' => $slug, 'title' => $title, 'short_story' => 'Welcome to your new hotel, we are super happy that you chose to use Atom CMS!', 'full_story' => sprintf('Welcome to your new hotel!

First of all thank you for using Atom CMS - it truly means a lot❀️

We built Atom CMS for you and your users to get the best possible experience when it comes to visiting %s, and we hope the journey has been a pleasure for you so far.

We have used modern and industry approved technologies (Laravel & Tailwind CSS) in order to give you the most secure & robust CMS possible.

Our idea of a good CMS is accessibility and just that, is what we have tried to make Atom CMS, so that you can be able to customise it without being a PHP expert or frontend guru.

Some of the built in features
Atom CMS comes packed with tons of features, we will however only mention a few that might help to improve your hotel further!

Built in theme system!
Atom CMS has its own theme system, making it an absolute breeze to brew up a new theme or switch themes between the existing ones. If you wish to build your own theme, but is a bit unsure how to start, then head over to the Our documentation site. It gives you a good idea on how to use the theming system and tons of other aspects of running your hotel✨

With everything being said it is time to wrap up the introduction, but before we do that we want to wish you the best of luck with your hotel!', setting('hotel_name')), - 'user_id' => User::query()->first()->id, + 'user_id' => $user->id, 'image' => 'website_news_images/default.png', ]); } diff --git a/Updated_Cms/database/seeders/WebsiteHelperCenterCategorySeeder.php b/Updated_Cms/database/seeders/WebsiteHelperCenterCategorySeeder.php index 020ca85f78..db90518511 100644 --- a/Updated_Cms/database/seeders/WebsiteHelperCenterCategorySeeder.php +++ b/Updated_Cms/database/seeders/WebsiteHelperCenterCategorySeeder.php @@ -9,18 +9,19 @@ class WebsiteHelperCenterCategorySeeder extends Seeder { public function run(): void { + $defaultName = is_string(config('habbo.site.default_name')) ? config('habbo.site.default_name') : ''; $categories = [ [ - 'name' => config('habbo.site.default_name') . ' Way', - 'content' => 'Welcome to the ' . config('habbo.site.default_name') . " Hotel, where fun and excitement are always around the corner! πŸŽ‰ To ensure that everyone has the best experience possible, we've created The " . config('habbo.site.default_name') . " Way - our special set of rules that keeps our community safe and friendly. 🌈

It's important to know that these rules and regulations can change without notice. As a member of our awesome " . config('habbo.site.default_name') . " community, you agree to follow these terms and conditions. 😊 If you don't, there may be sanctions applied to your account.

But don't worry! If you have any questions or concerns about The " . config('habbo.site.default_name') . ' Way, our friendly Hotel Staff are always here to help. πŸ’¬ Now, go ahead and click the button below to read The ' . config('habbo.site.default_name') . ' Way and join us in creating a fantastic environment for all! πŸš€', + 'name' => $defaultName . ' Way', + 'content' => 'Welcome to the ' . $defaultName . " Hotel, where fun and excitement are always around the corner! πŸŽ‰ To ensure that everyone has the best experience possible, we've created The " . $defaultName . " Way - our special set of rules that keeps our community safe and friendly. 🌈

It's important to know that these rules and regulations can change without notice. As a member of our awesome " . $defaultName . " community, you agree to follow these terms and conditions. 😊 If you don't, there may be sanctions applied to your account.

But don't worry! If you have any questions or concerns about The " . $defaultName . ' Way, our friendly Hotel Staff are always here to help. πŸ’¬ Now, go ahead and click the button below to read The ' . $defaultName . ' Way and join us in creating a fantastic environment for all! πŸš€', 'image_url' => 'safety_tips_1.png', - 'button_text' => config('habbo.site.default_name') . ' Way', + 'button_text' => $defaultName . ' Way', 'button_url' => '/help-center/rules', 'position' => 1, ], [ 'name' => 'Ban Appeals', - 'content' => "If you think you've been unfairly banned from our super cool hotel, no worries - we're here to help! 🌟 All you need to do is submit a ticket 🎟️ and let us know what happened.

We'll check it out and give you a fair chance to return to the awesome world of " . config('habbo.site.default_name') . "! πŸ•ΊπŸ’ƒ So go ahead, share your side of the story, and let's get you back in on the fun! πŸ˜„", + 'content' => "If you think you've been unfairly banned from our super cool hotel, no worries - we're here to help! 🌟 All you need to do is submit a ticket 🎟️ and let us know what happened.

We'll check it out and give you a fair chance to return to the awesome world of " . $defaultName . "! πŸ•ΊπŸ’ƒ So go ahead, share your side of the story, and let's get you back in on the fun! πŸ˜„", 'image_url' => 'safety_tips_5.png', 'button_text' => 'Submit a ban appeal', 'button_url' => '/help-center/tickets/create', @@ -28,7 +29,7 @@ class WebsiteHelperCenterCategorySeeder extends Seeder ], [ 'name' => 'VPN Unblock', - 'content' => "We know that sometimes you might need to use a VPN or proxy connection while visiting our fantastic hotel! 🏨 But since we want to keep our community safe and free from toxicity, we block these connections by default. πŸ›‘οΈ

However, we understand that there are exceptions, and we're here to help! 🌟 If you find yourself in one of these situations, you can request VPN unblocking:

1. You're not using a VPN but still got flagged somehow. 🚩
2. You're at school or university and need a VPN to access " . config('habbo.site.default_name') . ". 🏫
3. You're on public connections that might be flagged as a VPN.
πŸ“±

Please note that if using a VPN is optional for you, we usually deny the request. This is just to make sure we maintain a positive and friendly environment for all our users! πŸ˜„

To request VPN unblocking, simply submit a ticket with an explanation of your situation, and we'll do our best to help you out! Together, let's keep the " . config('habbo.site.default_name') . ' Hotel experience amazing for everyone! πŸŽ‰', + 'content' => "We know that sometimes you might need to use a VPN or proxy connection while visiting our fantastic hotel! 🏨 But since we want to keep our community safe and free from toxicity, we block these connections by default. πŸ›‘οΈ

However, we understand that there are exceptions, and we're here to help! 🌟 If you find yourself in one of these situations, you can request VPN unblocking:

1. You're not using a VPN but still got flagged somehow. 🚩
2. You're at school or university and need a VPN to access " . $defaultName . ". 🏫
3. You're on public connections that might be flagged as a VPN.
πŸ“±

Please note that if using a VPN is optional for you, we usually deny the request. This is just to make sure we maintain a positive and friendly environment for all our users! πŸ˜„

To request VPN unblocking, simply submit a ticket with an explanation of your situation, and we'll do our best to help you out! Together, let's keep the " . $defaultName . ' Hotel experience amazing for everyone! πŸŽ‰', 'image_url' => 'safety_tips_2.png', 'button_text' => 'Submit Unblock request', 'button_url' => '/help-center/tickets/create', @@ -36,7 +37,7 @@ class WebsiteHelperCenterCategorySeeder extends Seeder ], [ 'name' => 'Scam Reports', - 'content' => 'Hey ' . config('habbo.site.default_name') . " buddies! πŸŽ‰ We know that sometimes, unfortunately, users might try to scam others out of their coins, diamonds, or furniture. 😒 But don't worry, we've got your back! We don't tolerate this kind of behavior, and we're here to help you report it. 🌟

Have you been scammed? 😨

If so, we're here to assist! Just follow the template below and include it in a ticket under the 'Scam Reports' option:

1. Scammed by:
2. Date of Scam:
3. Items Scammed:
4. Evidence (if available):


Remember, it's important to be honest and true to yourself! 🌈 Nobody likes a trickster, and stealing won't make you rich - it makes you a criminal. πŸ˜” By reporting scams, we can work together to keep the " . config('habbo.site.default_name') . ' Hotel a fun, safe, and amazing place for everyone! 🎊', + 'content' => 'Hey ' . $defaultName . " buddies! πŸŽ‰ We know that sometimes, unfortunately, users might try to scam others out of their coins, diamonds, or furniture. 😒 But don't worry, we've got your back! We don't tolerate this kind of behavior, and we're here to help you report it. 🌟

Have you been scammed? 😨

If so, we're here to assist! Just follow the template below and include it in a ticket under the 'Scam Reports' option:

1. Scammed by:
2. Date of Scam:
3. Items Scammed:
4. Evidence (if available):


Remember, it's important to be honest and true to yourself! 🌈 Nobody likes a trickster, and stealing won't make you rich - it makes you a criminal. πŸ˜” By reporting scams, we can work together to keep the " . $defaultName . ' Hotel a fun, safe, and amazing place for everyone! 🎊', 'image_url' => 'safety_tips_7.png', 'button_text' => 'Submit scam report', 'position' => 4, diff --git a/Updated_Cms/database/seeders/WebsiteMaintenanceTasksSeeder.php b/Updated_Cms/database/seeders/WebsiteMaintenanceTasksSeeder.php index d741ed006c..4143e259f2 100644 --- a/Updated_Cms/database/seeders/WebsiteMaintenanceTasksSeeder.php +++ b/Updated_Cms/database/seeders/WebsiteMaintenanceTasksSeeder.php @@ -13,8 +13,8 @@ class WebsiteMaintenanceTasksSeeder extends Seeder { public function run(): void { - $permission = Permission::query()->orderByDesc('id')->first(); - $user = User::query()->where('rank', $permission->id)->first(); + $permissionId = Permission::query()->orderByDesc('id')->value('id'); + $user = User::query()->where('rank', is_int($permissionId) ? $permissionId : 1)->first(); if ($user === null) { $user = User::query()->create([ @@ -30,7 +30,7 @@ class WebsiteMaintenanceTasksSeeder extends Seeder 'ip_current' => '127.0.0.1', 'auth_ticket' => '', 'home_room' => 0, - 'rank' => $permission?->id ?? 1, + 'rank' => is_int($permissionId) ? $permissionId : 1, ]); } diff --git a/Updated_Cms/database/seeders/WebsiteRuleSeeder.php b/Updated_Cms/database/seeders/WebsiteRuleSeeder.php index 047b3fcffc..702db6a1b6 100644 --- a/Updated_Cms/database/seeders/WebsiteRuleSeeder.php +++ b/Updated_Cms/database/seeders/WebsiteRuleSeeder.php @@ -10,7 +10,7 @@ class WebsiteRuleSeeder extends Seeder { public function run(): void { - $categories = WebsiteRuleCategory::all()->pluck('id'); + $categories = WebsiteRuleCategory::query()->pluck('id')->all(); $rules = [ // General rules