From 6440b038cafe0b5a2e55f4279fbfa42afef2d73d Mon Sep 17 00:00:00 2001 From: tabuna Date: Fri, 27 May 2016 21:36:43 +0300 Subject: [PATCH] update version and change structure --- Console/MakeListener.php | 8 ++++---- Console/Server.php | 27 ++++++--------------------- Providers/SocketServiceProvider.php | 5 +++-- README.md | 2 +- composer.json | 7 ++++--- 5 files changed, 18 insertions(+), 31 deletions(-) diff --git a/Console/MakeListener.php b/Console/MakeListener.php index 3ab073b..17bf22b 100644 --- a/Console/MakeListener.php +++ b/Console/MakeListener.php @@ -1,5 +1,6 @@ httpHost, $this->port, $this->address); - require_once(app_path() . '/Socket/routes.php'); + require_once app_path() . '/Socket/routes.php'; $this->info('Laravel web socket server started on ' . $this->httpHost . ':' . $this->port . '/' . 'address:' . $this->address); $socket->run(); } - - } diff --git a/Providers/SocketServiceProvider.php b/Providers/SocketServiceProvider.php index 0f8e4a4..3751909 100644 --- a/Providers/SocketServiceProvider.php +++ b/Providers/SocketServiceProvider.php @@ -33,16 +33,17 @@ protected function registerConfig() { $this->publishes([ __DIR__ . '/../Config/socket.php' => config_path('socket.php'), - __DIR__ . '/../routes.php' => app_path('/Socket/routes.php'), + __DIR__ . '/../Services/Socket/routes.php' => app_path('/Http/Socket/routes.php'), ]); $this->mergeConfigFrom( __DIR__ . '/../Config/socket.php', 'socket' ); } + public function registerProviders() { - $this->app->register('Orchid\\Socket\\Providers\\ConsoleServiceProvider'); + // $this->app->register('Orchid\\Socket\\Providers\\ConsoleServiceProvider'); } /** diff --git a/README.md b/README.md index e18a34e..33613a6 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ php artisan make:socket MyNameClass 1. add socket route ```php -You will define most of the routes for your application in the app/Socket/routes.php file +You will define most of the routes for your application in the app/Http/Socket/routes.php file ``` 1. start socket server diff --git a/composer.json b/composer.json index 48560cd..fce6408 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,8 @@ "web", "websocket", "socket", - "php" + "php", + "server" ], "license": "MIT", "authors": [ @@ -18,8 +19,8 @@ ], "require": { "php": ">=5.5.9", - "laravel/framework": "5.1.*", - "cboden/ratchet": "^0.3.3" + "laravel/framework": ">5.0", + "cboden/ratchet": "^0.3.5" }, "autoload": { "psr-4": {