Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Geo Genius Laravel Package

devrabiul/laravel-geo-genius

Laravel GeoGenius adds IP-based geolocation, automatic timezone detection/conversion, locale detection with translation and number conversion, plus a country picker and phone formatting/validation. Works with Livewire and supports cookies or headers.

View on GitHub
Deep Wiki
Context7
v1.6

πŸš€ Laravel GeoGenius v1.6 Released

We’re excited to announce v1.6 of Laravel GeoGenius β€” bringing a major improvement to session handling and flow stability.

This update focuses on making the package more predictable, performant, and developer-friendly when dealing with user state across requests.


✨ What’s New

πŸ”„ Improved Session Flow (Core Enhancement)

The session handling mechanism has been refactored and optimized to ensure:

  • βœ… More consistent geo data persistence across requests
  • ⚑ Reduced redundant API calls (better caching + session sync)
  • 🧠 Smarter fallback logic when session data is missing or expired
  • πŸ” Seamless reuse of detected location, timezone, and locale
  • πŸ›‘οΈ Better handling of edge cases (e.g., session reset, guest users)

This results in a more stable and efficient user experience, especially in multi-request flows and Livewire interactions.


⚑ Performance Improvements

  • Reduced repeated geolocation lookups by leveraging session-first strategy
  • Optimized internal checks before calling external IP APIs
  • Better coordination between cache and session layers

πŸ“¦ Installation / Update

composer require devrabiul/laravel-geo-genius

πŸ”— Links


❀️ Feedback & Contributions

If you find this update helpful, consider ⭐ starring the repo and sharing feedback!

v1.5

πŸš€ Release v1.5

✨ What’s New

  • Resolved PHP 8.2+ deprecation warnings caused by static trait method calls
  • Refactored internal language handling to use a dedicated helper class
  • Improved compatibility with Laravel 11 and Laravel 12
  • Enhanced internal architecture for better stability and maintainability

πŸ›  Improvements & Fixes

  • Removed deprecated direct static calls to LanguageTrait
  • Introduced a proper class-based approach for consuming trait logic
  • Ensured forward compatibility with future PHP versions
  • Minor internal code cleanup and optimizations

βœ… Compatibility

  • PHP: 8.1, 8.2, 8.3, 8.4
  • Laravel: 10.x, 11.x, 12.x

πŸ”„ Upgrade Notes

  • No breaking changes
  • No action required for existing users
  • Safe drop-in upgrade from v1.4

πŸ“¦ Versioning

  • Previous: v1.4
  • Current: v1.5
  • Type: Minor release (internal refactor + compatibility improvements)

πŸ’‘ Why Upgrade?

If you are running PHP 8.2+ or Laravel 11/12, this release eliminates deprecation warnings and ensures smoother long-term support.

v1.4

🏷️ Release v1.4 β€” β€œRestrict Countries & Enhanced Phone Input Controls”

🎯 New Features

  • Restrict to Specific Countries You can now limit the phone input country dropdown to only the countries you choose. Add the configuration in config/laravel-geo-genius.php:

    'phone_input' => [
        'initial_country'     => env('GEO_PHONE_DEFAULT_COUNTRY', 'us'),
        'only_countries_mode' => true,           // enable restriction
        'only_countries_array' => ['us', 'gb'],  // allowed countries only
        // other options …
    ],
    

    With this enabled, your phone input will only show the specified countries, ignoring others.

  • Improved Data Attributes & JSON Encoding When only_countries_mode is true, the only_countries_array is now output as a JSON-encoded string in the HTML data-only-countries-array attribute to ensure more reliable parsing in JavaScript.

  • Better JS Integration The intl-tel-input initialization script now safely handles:

    • onlyCountries when mode is enabled
    • Fallbacks when the array is empty or mode is disabled
    • Proper boolean parsing for config flags

πŸ› Fixes & Enhancements

  • Ensure that when only_countries_mode is false, the data-only-countries-array is always set to an empty array ([]) to avoid mis-parsing.
  • More robust error handling in the JavaScript initialization so it doesn’t break if attributes are missing or invalid.
  • Minor refactorings in the Blade / PHP side to simplify attribute building and readability.
  • Cleaned up docs, examples, and README to include the new β€œRestrict to Specific Countries” section.

πŸ“š Documentation Updates

  • Added β€œRestrict to Specific Countries” section in README (under Country Picker & Phone Input)
  • Example code for both restrictive and full-mode usage
  • Updated changelog file CHANGELOG.md with v1.4 entry and links to configuration and JS details
v1.3

πŸš€ Laravel GeoGenius v1.3

v1.3 Update β€” Advanced translation automation, smarter artisan commands, and an even smoother multilingual developer experience.

✨ New & Improved Features

  • πŸ“ Auto-Generate Translations from Codebase β€” New command scans your entire project for translate('...') calls and builds the messages.php file automatically:

    php artisan geo:translations-generate --locale={locale}
    

    Example:

    php artisan geo:translations-generate --locale=en
    
  • πŸ”„ Batch & Continuous Translation β€” Control how messages are translated:

    • geo:translate-language-batch β†’ Translate a fixed batch of strings.
    • geo:translate-language-all β†’ Keep translating until all are done.

    Examples:

    php artisan geo:translate-language-batch en --count=50
    php artisan geo:translate-language-all en --count=300
    
  • ⚑ Streamlined Workflow β€” Combine with existing geo:add-language and geo:translate-language to go from detection β†’ generation β†’ translation seamlessly.

  • πŸ“‚ Smarter File Handling β€” Automatic detection and creation of missing language files (messages.php, new-messages.php) with improved reliability.

  • 🌍 Even Better Multilingual Support β€” Cleaner, faster, and more developer-friendly tooling for global apps.

πŸ“ Installation / Upgrade

composer update devrabiul/laravel-geo-genius

πŸ“š Docs & Demo

v1.2

πŸš€ Laravel GeoGenius v1.2

v1.2 Update β€” Powerful translation command, better multilingual workflow, and improved developer experience.

✨ New & Improved Features

  • πŸ“ Translate Missing Strings via Artisan β€” New command automatically translates strings in new-messages.php for any locale:

    php artisan geo:translate-language {locale}
    

    Examples:

    php artisan geo:translate-language bn
    php artisan geo:translate-language bn --count=20 # translate 20 at a time
    
  • 🌐 Enhanced Auto-Translation β€” Smoother detection and translation of user messages based on Geo-IP.

  • πŸ”§ Configurable Translation Count β€” Limit how many strings get translated per run with --count option.

  • πŸ“‚ Improved Language File Handling β€” Better checks for resources/lang/{locale}/new-messages.php and clearer console feedback.

  • ⚑ Refined Internal Services β€” Optimised code paths for faster translations and lower API usage.

  • πŸ”„ Backward Compatible β€” All previous features (timezone, geolocation, multilingual, country picker, Livewire support) remain fully functional.

πŸ“ Installation / Upgrade

composer update devrabiul/laravel-geo-genius
php artisan vendor:publish --provider="Devrabiul\\LaravelGeoGenius\\LaravelGeoGeniusServiceProvider"

πŸ“š Docs & Demo

v1.1

πŸš€ Laravel GeoGenius v1.1

v1.1 Update β€” Enhancements for multilingual support, user language management, and code optimization.

✨ New & Improved Features

  • 🏷️ Add New Language via Artisan β€” Use the new command to add language files easily:

    php artisan geo:add-language {locale}
    

    Example:

    php artisan geo:add-language bn
    
  • 🌐 Automatic User Language Detection β€” Detect and set the language based on visitor preferences or browser settings.

  • πŸ‘€ Per-User Language Switching β€” Change the current user’s language programmatically:

    laravelGeoGenius()->language()->changeUserLanguage('bn');
    
  • ⚑ Optimized Code & Performance β€” Refactored language handling and internal services for faster response and lower resource usage.

  • πŸ”„ Backward Compatible β€” All previous features remain fully functional (geolocation, timezone, country picker, phone validation, caching, Livewire support).

πŸ“ Installation / Upgrade

composer update devrabiul/laravel-geo-genius
php artisan vendor:publish --provider="Devrabiul\\LaravelGeoGenius\\LaravelGeoGeniusServiceProvider"

πŸ“š Docs & Demo

v1.0

πŸš€ Laravel GeoGenius v1.0

Initial stable release of Laravel GeoGenius β€” a complete toolkit for geolocation, timezone management, multilingual support and country-aware phone inputs in Laravel apps.

✨ Features

  • 🌐 IP-based Geolocation β€” Detect visitor country, city, region, timezone, currency & more
  • πŸ•’ Timezone Management β€” Auto-detect user timezone, convert UTC timestamps, list all supported zones
  • 🏷️ Multilingual & Auto-Translation β€” Detect locale, translate messages automatically, convert numbers to local digits
  • πŸ“± Country Picker & Phone Validation β€” Pre-configured intl-tel-input integration with auto country detection and built-in number validation
  • ⚑ Lightweight & Dependency-Free β€” Works without jQuery or heavy JS frameworks
  • πŸ”’ Caching Support β€” Reduces API calls
  • πŸ”§ Artisan Support β€” Quickly add a timezone column to your users table

πŸ“ Installation

composer require devrabiul/laravel-geo-genius
php artisan vendor:publish --provider="Devrabiul\\LaravelGeoGenius\\LaravelGeoGeniusServiceProvider"

πŸ“š Docs & Demo

βœ… Notes

  • Compatible with Laravel 8+
  • Fully works with Livewire
  • Licensed under MIT & Treeware β€” plant a tree if you use it in production
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport