-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c641a51
Showing
11 changed files
with
277 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
preset: laravel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changelog | ||
|
||
All notable changes to `ChatSystem` will be documented in this file. | ||
|
||
## Version 1.0 | ||
|
||
### Added | ||
- Everything |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "myckhel/laravel-chat-system", | ||
"description": "laravel chat system", | ||
"license": "license", | ||
"authors": [ | ||
{ | ||
"name": "myckhel", | ||
"email": "[email protected]", | ||
"homepage": "myckhel.com" | ||
} | ||
], | ||
"homepage": "https://github.com/myckhel/laravel-chat-system", | ||
"keywords": ["Laravel", "ChatSystem"], | ||
"require": { | ||
"php": "^7.4|^8.0", | ||
"illuminate/support": "~7|~8" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "~9.0", | ||
"orchestra/testbench": "~5|~6" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Myckhel\\ChatSystem\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Myckhel\\ChatSystem\\Tests\\": "tests" | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Myckhel\\ChatSystem\\ChatSystemServiceProvider" | ||
], | ||
"aliases": { | ||
"ChatSystem": "Myckhel\\ChatSystem\\Facades\\ChatSystem" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
return [ | ||
// | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Contributing | ||
|
||
Contributions are welcome and will be fully credited. | ||
|
||
Contributions are accepted via Pull Requests on [Github](https://github.com/myckhel/laravel-chat-system). | ||
|
||
# Things you could do | ||
If you want to contribute but do not know where to start, this list provides some starting points. | ||
- Add license text | ||
- Remove rewriteRules.php | ||
- Set up TravisCI, StyleCI, ScrutinizerCI | ||
- Write a comprehensive ReadMe | ||
|
||
## Pull Requests | ||
|
||
- **Add tests!** - Your patch won't be accepted if it doesn't have tests. | ||
|
||
- **Document any change in behaviour** - Make sure the `readme.md` and any other relevant documentation are kept up-to-date. | ||
|
||
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. | ||
|
||
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. | ||
|
||
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. | ||
|
||
|
||
**Happy coding**! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# The license | ||
|
||
Copyright (c) author name <author email> | ||
|
||
...Add your license text here... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false"> | ||
<testsuites> | ||
<testsuite name="Package"> | ||
<directory suffix=".php">./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory>src/</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# ChatSystem | ||
|
||
[![Latest Version on Packagist][ico-version]][link-packagist] | ||
[![Total Downloads][ico-downloads]][link-downloads] | ||
[![Build Status][ico-travis]][link-travis] | ||
[![StyleCI][ico-styleci]][link-styleci] | ||
|
||
This is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list. | ||
|
||
## Installation | ||
|
||
Via Composer | ||
|
||
``` bash | ||
$ composer require myckhel/laravel-chat-system | ||
``` | ||
|
||
## Usage | ||
|
||
## Change log | ||
|
||
Please see the [changelog](changelog.md) for more information on what has changed recently. | ||
|
||
## Testing | ||
|
||
``` bash | ||
$ composer test | ||
``` | ||
|
||
## Contributing | ||
|
||
Please see [contributing.md](contributing.md) for details and a todolist. | ||
|
||
## Security | ||
|
||
If you discover any security related issues, please email author email instead of using the issue tracker. | ||
|
||
## Credits | ||
|
||
- [author name][link-author] | ||
- [All Contributors][link-contributors] | ||
|
||
## License | ||
|
||
license. Please see the [license file](license.md) for more information. | ||
|
||
[ico-version]: https://img.shields.io/packagist/v/myckhel/laravel-chat-system.svg?style=flat-square | ||
[ico-downloads]: https://img.shields.io/packagist/dt/myckhel/laravel-chat-system.svg?style=flat-square | ||
[ico-travis]: https://img.shields.io/travis/myckhel/laravel-chat-system/master.svg?style=flat-square | ||
[ico-styleci]: https://styleci.io/repos/12345678/shield | ||
|
||
[link-packagist]: https://packagist.org/packages/myckhel/laravel-chat-system | ||
[link-downloads]: https://packagist.org/packages/myckhel/laravel-chat-system | ||
[link-travis]: https://travis-ci.org/myckhel/laravel-chat-system | ||
[link-styleci]: https://styleci.io/repos/12345678 | ||
[link-author]: https://github.com/myckhel | ||
[link-contributors]: ../../contributors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Myckhel\ChatSystem; | ||
|
||
class ChatSystem | ||
{ | ||
static function hello() { | ||
return 'hello-world'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
|
||
namespace Myckhel\ChatSystem; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
|
||
class ChatSystemServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* Perform post-registration booting of services. | ||
* | ||
* @return void | ||
*/ | ||
public function boot(): void | ||
{ | ||
// $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'myckhel'); | ||
// $this->loadViewsFrom(__DIR__.'/../resources/views', 'myckhel'); | ||
// $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); | ||
// $this->loadRoutesFrom(__DIR__.'/routes.php'); | ||
|
||
// Publishing is only necessary when using the CLI. | ||
if ($this->app->runningInConsole()) { | ||
$this->bootForConsole(); | ||
} | ||
} | ||
|
||
/** | ||
* Register any package services. | ||
* | ||
* @return void | ||
*/ | ||
public function register(): void | ||
{ | ||
$this->mergeConfigFrom(__DIR__.'/../config/chatsystem.php', 'chatsystem'); | ||
|
||
// Register the service the package provides. | ||
$this->app->singleton('chat-system', function ($app) { | ||
return new ChatSystem; | ||
}); | ||
} | ||
|
||
/** | ||
* Get the services provided by the provider. | ||
* | ||
* @return array | ||
*/ | ||
public function provides() | ||
{ | ||
return ['chatsystem']; | ||
} | ||
|
||
/** | ||
* Console-specific booting. | ||
* | ||
* @return void | ||
*/ | ||
protected function bootForConsole(): void | ||
{ | ||
// Publishing the configuration file. | ||
$this->publishes([ | ||
__DIR__.'/../config/chatsystem.php' => config_path('chatsystem.php'), | ||
], 'chatsystem.config'); | ||
|
||
// Publishing the views. | ||
/*$this->publishes([ | ||
__DIR__.'/../resources/views' => base_path('resources/views/vendor/myckhel'), | ||
], 'chatsystem.views');*/ | ||
|
||
// Publishing assets. | ||
/*$this->publishes([ | ||
__DIR__.'/../resources/assets' => public_path('vendor/myckhel'), | ||
], 'chatsystem.views');*/ | ||
|
||
// Publishing the translation files. | ||
/*$this->publishes([ | ||
__DIR__.'/../resources/lang' => resource_path('lang/vendor/myckhel'), | ||
], 'chatsystem.views');*/ | ||
|
||
// Registering package commands. | ||
// $this->commands([]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Myckhel\ChatSystem\Facades; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class ChatSystem extends Facade | ||
{ | ||
/** | ||
* Get the registered name of the component. | ||
* | ||
* @return string | ||
*/ | ||
protected static function getFacadeAccessor(): string | ||
{ | ||
return 'chat-system'; | ||
} | ||
} |