Download the PHP package ashfaq1701/laravel-chat without Composer

On this page you can find all versions of the php package ashfaq1701/laravel-chat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-chat

Laravel Chat

This package is a simple but feature rich implementation of chatting functionality using Ratchet based Laravel pacakage Laravel Socket. It is a channel based chatting platform which has base for group chatting, file and image messaging with image display on client side. Also it has push notification for user online and offline status. Has limited message loading and load more option. At once even with required modification of css, it can be deployed as a chat application at once. It has easy installation procedure and published resources to adapt to any use cases.

Requirements

Laravel 5.2. 5.3 support coming soon.

Installation

You can install the package using the Composer package manager. You can install it by running this command in your project root:

Add the Codemash\Socket\SocketServiceProvider and Ashfaq1701\LaravelChat\Providers\LaravelChatServiceProvider provider to the providers array in config/app.php':

Then run the following command,

The published assets can be found at config/socket.php, config/chat.php, app/Http/Controllers/Chat, app/Repositories, app/Listeners, app/Models, database/migrations, database/seeds, resources/views/chat, css and javascripts at public/vendor/socket and public/vendor/chat directories. Routes will be published too. It is important to know that the Chat::javascript() facade function will include both a default socket located at window.appSocket and socket.js, ajax-fileupload.js and chat.js source file located in the vendor folder. These are merely a start, and provide a quick way to work with the chats and sockets but you are always free to write a custom implementation.

After publish you have to follow some steps again.

Add App\Providers\ChatEventServiceProvider to the providers array in config/app.php.

Then, add the facades to your aliases array. The default facade provides an easy-to-use interface to integrate the socket files in your view.

Then run migrations,

There are few helping seeds provided for you to get you started. To run them add then in the run method of DatabaseSeeder class. You could need composer dump-autoload command once for the publish to be effected for seeders.

Then run those seeders,

Use the Ashfaq1701\LaravelChat\Traits\Chattable trait from the App\User model.

Then inside App\Http\Middleware\VerifyCsrfToken.php exclude the ajax file upload route from the CSRF protection. This is required otherwise the file and image messages will not work. Also inside public\, create uploads\files empty directory.

The last thing is add a section in the resources\views\layouts\app.blade.php. At the end of all javascript declarations, add a section named custom-scripts. Like this,

Getting started

Finally, let's run the socket listener. You can do this by running the following artisan command in the project root:

After that run the application (for dev).

Check database for a set of email and password (preferably first user if the seeder ran). Then login to the system and visit http://localhost:8000/chat url. You will see a fully functional chat running. Experiment with it. All files are published, so you can do almost any customization you need.

Production

Ubuntu provides the neat nohup tool, which runs processes on the background. In case you'd like to run your socket on a production server and you're on Ubuntu, you may always use the nohup tool to run the socket listener.

When using the jobs command, you'll see the socket running. It's easy to kill the process using the kill <pid> command. The process ID is listed in the jobs list.

Contributing

If you're having problems, spot a bug, or have a feature suggestion, please log and issue on Github. If you'd like to have a crack yourself, fork the package and make a pull request. Any improvements are more than welcome.


All versions of laravel-chat with dependencies

PHP Build Version
Package Version
Requires codemash/laravel-socket Version ^1.0
fzaninotto/faker Version ^1.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ashfaq1701/laravel-chat contains the following files

Loading the files please wait ....