ok

Mini Shell

Direktori : /home2/selectio/www/a1tex.in/vendor/laravel/framework/src/Illuminate/Support/Traits/
Upload File :
Current File : /home2/selectio/www/a1tex.in/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php

<?php

namespace Illuminate\Support\Traits;

use Illuminate\Container\Container;

trait Localizable
{
    /**
     * Run the callback with the given locale.
     *
     * @param  string  $locale
     * @param  \Closure  $callback
     * @return mixed
     */
    public function withLocale($locale, $callback)
    {
        if (! $locale) {
            return $callback();
        }

        $app = Container::getInstance();

        $original = $app->getLocale();

        try {
            $app->setLocale($locale);

            return $callback();
        } finally {
            $app->setLocale($original);
        }
    }
}

Zerion Mini Shell 1.0