my changes

This commit is contained in:
Arno Kaimbacher 2018-08-06 14:30:51 +02:00
parent 28301e4312
commit 8dc1f1b048
263 changed files with 36882 additions and 4453 deletions

View file

@ -26,8 +26,8 @@ class AppServiceProvider extends ServiceProvider {
public function register()
{
$this->app->bind(
'Illuminate\Contracts\Auth\Registrar',
'App\Services\Registrar'
'Illuminate\Contracts\Auth\Registrar'
// 'App\Services\Registrar'
);
}

View file

@ -0,0 +1,24 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
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');
}
}

View file

@ -1,34 +0,0 @@
<?php namespace App\Providers;
use Illuminate\Bus\Dispatcher;
use Illuminate\Support\ServiceProvider;
class BusServiceProvider extends ServiceProvider {
/**
* Bootstrap any application services.
*
* @param \Illuminate\Bus\Dispatcher $dispatcher
* @return void
*/
public function boot(Dispatcher $dispatcher)
{
$dispatcher->mapUsing(function($command)
{
return Dispatcher::simpleMapping(
$command, 'App\Commands', 'App\Handlers\Commands'
);
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}

View file

@ -11,10 +11,10 @@ class EventServiceProvider extends ServiceProvider {
* @var array
*/
protected $listen = [
'event.name' => [
'EventListener',
],
];
'App\Events\Event' => [
'App\Listeners\EventListener',
],
];
/**
* Register any other events for your application.
@ -22,9 +22,9 @@ class EventServiceProvider extends ServiceProvider {
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
public function boot(DispatcherContract $events)
public function boot()
{
parent::boot($events);
parent::boot();
//
}

View file

@ -1,9 +1,12 @@
<?php namespace App\Providers;
<?php
use Illuminate\Routing\Router;
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider {
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to the controller routes in your routes file.
@ -20,9 +23,9 @@ class RouteServiceProvider extends ServiceProvider {
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function boot(Router $router)
public function boot()
{
parent::boot($router);
parent::boot();
//
}
@ -33,12 +36,42 @@ class RouteServiceProvider extends ServiceProvider {
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
public function map()
{
$router->group(['namespace' => $this->namespace], function($router)
{
require app_path('Http/routes.php');
});
//Route::group(['namespace' => $this->namespace], function()
//{
// require app_path('Http/routes.php');
//});
$this->mapApiRoutes();
$this->mapWebRoutes();
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}

View file

@ -0,0 +1,43 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Solarium\Client;
class SolariumServiceProvider extends ServiceProvider
{
protected $defer = true;
/**
* Register the application services.
*
* @return void
*/
public function register()
{
$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'
)
)
);
//return new Client($config);
return new Client($config);
//return new Client($app['config']['solarium']);
});
}
public function provides()
{
return [Client::class];
}
}