From d307256e6bcc19fc2e9e0463807c47d4bc666424 Mon Sep 17 00:00:00 2001 From: alireza Date: Wed, 22 May 2019 18:51:34 +0430 Subject: [PATCH 1/2] laravel 5.7 js folder move --- resources/{assets => }/js/components/ChatRoom.vue | 0 resources/{assets => }/js/components/FilePreview.vue | 0 resources/{assets => }/js/components/GroupChatRoom.vue | 0 resources/{assets => }/js/components/VideoSection.vue | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename resources/{assets => }/js/components/ChatRoom.vue (100%) rename resources/{assets => }/js/components/FilePreview.vue (100%) rename resources/{assets => }/js/components/GroupChatRoom.vue (100%) rename resources/{assets => }/js/components/VideoSection.vue (100%) diff --git a/resources/assets/js/components/ChatRoom.vue b/resources/js/components/ChatRoom.vue similarity index 100% rename from resources/assets/js/components/ChatRoom.vue rename to resources/js/components/ChatRoom.vue diff --git a/resources/assets/js/components/FilePreview.vue b/resources/js/components/FilePreview.vue similarity index 100% rename from resources/assets/js/components/FilePreview.vue rename to resources/js/components/FilePreview.vue diff --git a/resources/assets/js/components/GroupChatRoom.vue b/resources/js/components/GroupChatRoom.vue similarity index 100% rename from resources/assets/js/components/GroupChatRoom.vue rename to resources/js/components/GroupChatRoom.vue diff --git a/resources/assets/js/components/VideoSection.vue b/resources/js/components/VideoSection.vue similarity index 100% rename from resources/assets/js/components/VideoSection.vue rename to resources/js/components/VideoSection.vue From aefa9b3c1b79ab68d2511acf0c7895c470304512 Mon Sep 17 00:00:00 2001 From: alireza Date: Wed, 22 May 2019 18:59:52 +0430 Subject: [PATCH 2/2] update new js path --- README.md | 28 ++++++++++++------------- src/LaravelVideoChatServiceProvider.php | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b57e372..3d73552 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,12 @@ If you don't use auto-discovery, add the ServiceProvider to the providers array PhpJunior\LaravelVideoChat\LaravelVideoChatServiceProvider::class, ``` -```php +```php php artisan vendor:publish --provider="PhpJunior\LaravelVideoChat\LaravelVideoChatServiceProvider" ``` -And -```php +And +```php php artisan migrate php artisan storage:link @@ -69,25 +69,25 @@ Install the JavaScript dependencies: npm install --save laravel-echo js-cookie vue-timeago socket.io socket.io-client webrtc-adapter vue-chat-scroll ``` -If you are running the Socket.IO server on the same domain as your web application, you may access the client library like +If you are running the Socket.IO server on the same domain as your web application, you may access the client library like ```javascript ``` in your application's `head` HTML element - + Next, you will need to instantiate Echo with the `socket.io` connector and a `host`. ```vuejs require('webrtc-adapter'); window.Cookies = require('js-cookie'); - + import Echo from "laravel-echo" - + window.io = require('socket.io-client'); - + window.Echo = new Echo({ broadcaster: 'socket.io', host: window.location.hostname + ':6001' @@ -98,18 +98,18 @@ Finally, you will need to run a compatible Socket.IO server. Use [tlaverdure/laravel-echo-server](https://github.com/tlaverdure/laravel-echo-server) GitHub repository. -In `resources/assets/js/app.js` file: +In `resources/js/app.js` file: ```vuejs import VueChatScroll from 'vue-chat-scroll'; import VueTimeago from 'vue-timeago'; - + Vue.use(VueChatScroll); Vue.component('chat-room' , require('./components/laravel-video-chat/ChatRoom.vue')); Vue.component('group-chat-room', require('./components/laravel-video-chat/GroupChatRoom.vue')); Vue.component('video-section' , require('./components/laravel-video-chat/VideoSection.vue')); Vue.component('file-preview' , require('./components/laravel-video-chat/FilePreview.vue')); - + Vue.use(VueTimeago, { name: 'timeago', // component name, `timeago` by default locale: 'en-US', @@ -172,12 +172,12 @@ $conversations = Chat::getAllConversations() ``` -#### Start Conversation +#### Start Conversation ```php Chat::startConversationWith($otherUserId); ``` -#### Accept Conversation +#### Accept Conversation ```php Chat::acceptMessageRequest($conversationId); ``` @@ -209,7 +209,7 @@ Use `$request->all()` for video call. Chat::startVideoCall($conversationId , $request->all()); ``` -#### Start Group Conversation +#### Start Group Conversation ```php Chat::createGroupConversation( $groupName , [ $otherUserId , $otherUserId2 ]); ``` diff --git a/src/LaravelVideoChatServiceProvider.php b/src/LaravelVideoChatServiceProvider.php index 748c984..ee584fa 100644 --- a/src/LaravelVideoChatServiceProvider.php +++ b/src/LaravelVideoChatServiceProvider.php @@ -25,7 +25,7 @@ public function boot() $this->publishes([ $this->configPath() => config_path('laravel-video-chat.php'), - $this->componentsPath() => base_path('resources/assets/js/components/laravel-video-chat'), + $this->componentsPath() => base_path('resources/js/components/laravel-video-chat'), ]); $this->loadMigrationsFrom($this->migrationsPath()); @@ -135,7 +135,7 @@ protected function migrationsPath() */ protected function componentsPath() { - return __DIR__.'/../resources/assets/js/components'; + return __DIR__.'/../resources/js/components'; } /**