PHP Classes

File: src/routes.php

Recommend this page to a friend!
  Classes of Stefan Ninic   Laravel Localization Package to Vue   src/routes.php   Download  
File: src/routes.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Laravel Localization Package to Vue
Get localization texts in array and JSON formats
Author: By
Last change:
Date: 6 years ago
Size: 461 bytes
 

Contents

Class file image Download
<?php
/**
 * Created by PhpStorm.
 * User: kgbot
 * Date: 6/4/18
 * Time: 12:18 AM.
 */
use KgBot\LaravelLocalization\Facades\ExportLocalizations;

/*
 * Localization
 */
Route::get(config('laravel-localization.routes.prefix'), function () {
   
$strings = ExportLocalizations::export()->toArray();

    return
response()->json($strings);
})->
name(config('laravel-localization.routes.name'))
     ->
middleware(config('laravel-localization.routes.middleware'));