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 geolocation, automatic timezone detection/conversion, locale & translation helpers, and a country picker with phone formatting/validation for Laravel. Works with Livewire and supports cookies or headers for detection.

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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor