<commit_before># Laravchat

Laravchat is a real-time chat package that will enable logged in users in an application to start conersations with other users and chat in real-time for Laravel 5.4+

## Installing

To install the package just run
```
composer require frutdev/laravchat v1.0.0
```

After this you'll have to have some things, follow these instructions:

First of all you will need to run
```
composer require pusher/pusher-php-server "~3.0"
npm install
npm install --save laravel-echo pusher-js
```

This package uses ```Carbon``` package so make sure to run, if you don't have it already:
```
composer require nesbot/carbon
```

Run
```
php artisan make:auth
```


Run
```
php artisan vendor:publish
```

And select ```Frutdev\Laravchat\LaravchatServiceProvider```

After doing this add the following line to your the ```mix``` in ```webpack.mix.js```
```
.js('resources/assets/laravchatjs/laravchat.js', 'public/js')
```


## IMPORTANT
Configure your ```.env``` file with your Pusher Key and go to ```vendor/frutdev/laravchat/src/resources/js/bootstrap.js``` and modify ```YOUR_APP_KEY``` and ```YOUR_APP_CLUSTER``` with the corresponding pusher key and cluster.


In ```config/broadcasting.php``` add the following to the ```options``` in ```pusher```

```
'cluster' => 'us2',  //OR YOUR OWN CLUSTER
'encrypted' => true,
```

If you are using ```Vue.js``` in your aplication this might be a little tricky but I will look into how to merge my file with ```js/app.js```

Within your ```resources/views/layouts/app.blade.php``` 

Add on top
```
<link href="{{ asset('css/laravchat.css') }}" rel="stylesheet">
```

And on the bottom remove

```
<script src="{{ asset('js/laravchat.js') }}"></script>
```

and add

```
<script src="{{ asset('js/laravchat.js') }}"></script>
```


Run
```
npm run dev
```

ALMOST THERE!

Uncomment ```App\Providers\BroadcastServiceProvider::class``` provider within ```config/app.php```

This package assumes your User model is in ```App\User```
Add to your User model ```UserTrait``` so it should look like this:

```
use Frutdev\Laravchat\Traits\UserTrait;

class User extends Authenticatable {
	use UserTrait;
```

Run
```
php artisan migrate
php artisan serve
```

Go to your localhost and enter ```/chat``` and you'll be able to chat with any user

## Versioning

V 1.0.0

## Authors

* **<NAME>** - *Developer* 

<commit_msg>Fianl changes for first release<commit_after># Laravchat

Laravchat is a real-time chat package that will enable logged in users in an application to start conersations with other users and chat in real-time for Laravel 5.4+

## Installing

To install the package just run
```
composer require frutdev/laravchat v1.0.0
```

After this you'll have to have some things, follow these instructions:

First of all you will need to run
```
composer require pusher/pusher-php-server "~3.0"
npm install
npm install --save laravel-echo pusher-js
```

This package uses ```Carbon``` package so make sure to run, if you don't have it already:
```
composer require nesbot/carbon
```

Run
```
php artisan make:auth
```


Run
```
php artisan vendor:publish
```

And select ```Frutdev\Laravchat\LaravchatServiceProvider```

After doing this add the following line to your the ```mix``` in ```webpack.mix.js```
```
.js('resources/assets/laravchatjs/laravchat.js', 'public/js')
```


If you are using ```Vue.js``` in your aplication this might be a little tricky but I will look into how to merge my file with ```js/app.js```

Within your ```resources/views/layouts/app.blade.php``` 

Add on top
```
<link href="{{ asset('css/laravchat.css') }}" rel="stylesheet">
```

And on the bottom remove

```
<script src="{{ asset('js/laravchat.js') }}"></script>
```

and add

```
<script src="{{ asset('js/laravchat.js') }}"></script>
```


Run
```
npm run dev
```

## IMPORTANT
Configure your ```.env``` file with your Pusher Key and go to ```resources/assets/laravchatjs/bootstrap.js``` and modify ```YOUR_APP_KEY``` and ```YOUR_APP_CLUSTER``` with the corresponding pusher key and cluster.


In ```config/broadcasting.php``` add the following to the ```options``` in ```pusher```

```
'cluster' => 'us2',  //OR YOUR OWN CLUSTER
'encrypted' => true,
```
ALMOST THERE!

Uncomment the following line in ```config/app.php```
```
App\Providers\BroadcastServiceProvider::class
``` 

This package assumes your User model is in ```App\User```
Add to your User model ```UserTrait``` so it should look like this:

```
use Frutdev\Laravchat\Traits\UserTrait;

class User extends Authenticatable {
	use UserTrait;
```

Run
```
php artisan migrate
php artisan serve
```

Go to your localhost and enter ```/chat``` and you'll be able to chat with any user

## Versioning

V 1.0.0

## Authors

* **<NAME>** - *Developer* 


{'fraction_non_alphanumeric': 0.15234292918680395, 'fraction_numerical': 0.004622819920151292, 'mean_word_length': 4.6, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '844529', 'n_tokens_mistral': 1656, 'n_tokens_neox': 1543, 'n_words': 564}