Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding New Languages and Countries to Keyword Monitor #1

Open
o-Oby opened this issue Jul 18, 2024 · 0 comments
Open

Adding New Languages and Countries to Keyword Monitor #1

o-Oby opened this issue Jul 18, 2024 · 0 comments

Comments

@o-Oby
Copy link

o-Oby commented Jul 18, 2024

Hello,

First of all, awesome software! It's well written and very useful.

I have been attempting to add new languages and countries to the system.

Despite following the necessary steps to update the seeder files, controllers, and views, the new entries are not being reflected in the dashboard. Here are the specific changes I made:

Seeder Files:

  • LanguagesTableSeeder.php
public function run()
{
    $languages = [
        ['code' => 'tr', 'name' => 'Türkçe'],
        ['code' => 'en', 'name' => 'English'],
        ['code' => 'es', 'name' => 'Spanish'],
        ['code' => 'de', 'name' => 'German'],
        ['code' => 'fr', 'name' => 'French'],
    ];

    DB::table('languages')->insertOrIgnore($languages);
}
  • CountriesTableSeeder.php
public function run()
{
    $countries = [
        ['code' => 'tr', 'name' => 'Turkiye'],
        ['code' => 'us', 'name' => 'United States'],
        ['code' => 'uk', 'name' => 'United Kingdom'],
        ['code' => 'de', 'name' => 'Germany'],
        ['code' => 'fr', 'name' => 'France'],
    ];

    DB::table('countries')->insertOrIgnore($countries);
}

HomeController.php

public function index()
{
    $keywords = Auth::user()->keywords()->orderBy('keyword', 'ASC')->get();
    $domains = Auth::user()->domains()->orderBy('name', 'ASC')->get();

    $languages = [
        'tr' => 'Türkçe',
        'en' => 'English',
        'es' => 'Spanish',
        'de' => 'German',
        'fr' => 'French'
    ];

    $countries = [
        'tr' => 'Turkiye',
        'us' => 'United States',
        'uk' => 'United Kingdom',
        'de' => 'Germany',
        'fr' => 'France'
    ];

    return view('home', compact('keywords', 'domains', 'countries', 'languages'));
}

Would you be able to provide guidance on how to successfully add these new entries, or if there might be an additional step I am missing?

Thank you very much :-)

Best,

Oby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant