iget-master/laravel-strict-translator

There is no license information available for the latest version (v0.1.2) of this package.

Enable strict mode for default Laravel Translator

v0.1.2 2017-07-26 19:29 UTC

This package is auto-updated.

Last update: 2024-11-28 07:07:04 UTC


README

Enable strict mode on default Laravel Translator.

Usage

Require this package on composer:

composer require iget-master/laravel-strict-translator

Replace Laravel's TranslationServiceProvider by our service provider:

//Illuminate\Translation\TranslationServiceProvider::class,
IgetMaster\StrictTranslator\StrictTranslatorServiceProvider::class,

Now when trying to use an invalid/unexisting translation key, you will receive an TranslationMissingException.

lang('unexisting.translation_key')

// TranslationMissingException: Translation key travel_resource.add_title not found.