language localization with browser settings

This commit is contained in:
Arno Kaimbacher 2018-11-27 12:21:42 +01:00
parent 8d91d0e7a8
commit f0e84a2991
13 changed files with 231 additions and 173 deletions

View file

@ -31,5 +31,4 @@ class AppServiceProvider extends ServiceProvider
// 'App\Services\Registrar'
);
}
}

View file

@ -1,24 +1,22 @@
<?php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @param \Illuminate\Bus\Dispatcher $dispatcher
* @return void
*/
public function boot()
{
Broadcast::routes();
require base_path('routes/channels.php');
}
/**
* Bootstrap any application services.
*
* @param \Illuminate\Bus\Dispatcher $dispatcher
* @return void
*/
public function boot()
{
Broadcast::routes();
require base_path('routes/channels.php');
}
}

View file

@ -1,9 +1,10 @@
<?php namespace App\Providers;
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class ConfigServiceProvider extends ServiceProvider {
class ConfigServiceProvider extends ServiceProvider
{
/**
* Overwrite any vendor / package configuration.
*
@ -19,5 +20,4 @@ class ConfigServiceProvider extends ServiceProvider {
//
]);
}
}

View file

@ -1,32 +1,31 @@
<?php namespace App\Providers;
<?php
namespace App\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider {
/**
* The event handler mappings for the application.
*
* @var array
*/
protected $listen = [
class EventServiceProvider extends ServiceProvider
{
/**
* The event handler mappings for the application.
*
* @var array
*/
protected $listen = [
'App\Events\Event' => [
'App\Listeners\EventListener',
],
];
/**
* Register any other events for your application.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
public function boot()
{
parent::boot();
//
}
/**
* Register any other events for your application.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
public function boot()
{
parent::boot();
//
}
}

View file

@ -1,5 +1,4 @@
<?php
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
@ -73,5 +72,4 @@ class RouteServiceProvider extends ServiceProvider
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}

View file

@ -20,19 +20,19 @@ class SolariumServiceProvider extends ServiceProvider
$this->app->bind(Client::class, function ($app) {
// $config = config('solarium');
$config = array(
'endpoint' => array(
'localhost' => array(
'host' => '127.0.0.1',
'port' => '8983',
'path' => '/solr/',
'core' => 'opus4'
)
'endpoint' => array(
'localhost' => array(
'host' => '127.0.0.1',
'port' => '8983',
'path' => '/solr/',
'core' => 'opus4'
)
);
)
);
//return new Client($config);
return new Client($config);
return new Client($config);
//return new Client($app['config']['solarium']);
});
});
}
public function provides()