Skip to content

Commit 01bbf8c

Browse files
update readme and so on
1 parent f07ca74 commit 01bbf8c

6 files changed

+24
-225
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
All notable changes to `laravel-kavenegar` will be documented in this file.
4+
5+
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

README.md

+16-62
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,37 @@
1-
# :package_name
2-
3-
[![Latest Version on Packagist][ico-version]][link-packagist]
4-
[![Software License][ico-license]](LICENSE.md)
5-
[![Build Status][ico-travis]][link-travis]
6-
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
7-
[![Quality Score][ico-code-quality]][link-code-quality]
8-
[![Total Downloads][ico-downloads]][link-downloads]
9-
10-
**Note:** Replace ```:author_name``` ```:author_username``` ```:author_website``` ```:author_email``` ```:vendor``` ```:package_name``` ```:package_description``` with their correct values in [README.md](README.md), [CHANGELOG.md](CHANGELOG.md), [CONTRIBUTING.md](CONTRIBUTING.md), [LICENSE.md](LICENSE.md) and [composer.json](composer.json) files, then delete this line. You can run `$ php prefill.php` in the command line to make all replacements at once. Delete the file prefill.php as well.
11-
12-
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what
13-
PSRs you support to avoid any confusion with users and contributors.
14-
15-
## Structure
16-
17-
If any of the following are applicable to your project, then the directory structure should follow industry best practises by being named the following.
18-
19-
```
20-
bin/
21-
config/
22-
src/
23-
tests/
24-
vendor/
25-
```
1+
# Persianalize
262

3+
**Persianalize** use to normalize Persian input and remove arabic and other similar characters.
274

285
## Install
296

307
Via Composer
318

329
``` bash
33-
$ composer require :vendor/:package_name
10+
$ composer require mahdimajidzadeh/persianalize
3411
```
3512

36-
## Usage
13+
If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php:
3714

3815
``` php
39-
$skeleton = new League\Skeleton();
40-
echo $skeleton->echoPhrase('Hello, League!');
16+
MahdiMajidzadeh\Persianalize\PersianalizeServiceProvider:class
4117
```
4218

43-
## Change log
44-
45-
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
19+
If you do run the package on Laravel 5.5+, package auto-discovery takes care of the magic of adding the service provider.
4620

47-
## Testing
48-
49-
``` bash
50-
$ composer test
51-
```
52-
53-
## Contributing
54-
55-
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.
56-
57-
## Security
21+
## Usage
5822

59-
If you discover any security related issues, please email :author_email instead of using the issue tracker.
23+
``` php
24+
$result = Persian::numbers_fa('123٤٥٦'); // return ۱۲۳۴۵۶
6025

61-
## Credits
26+
$result = Persian::numbers_en('۱۲۳٤٥٦'); // return 123456
6227

63-
- [:author_name][link-author]
64-
- [All Contributors][link-contributors]
28+
$result = Persian::text('ي ڲ ڬ'); // return ی گ ک
6529

66-
## License
30+
$result = Persian::persian($text); // make texts and numbers Persian
6731

68-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
32+
$result = Persian::standard($text); // make texts Persian and numbers English
33+
```
6934

70-
[ico-version]: https://img.shields.io/packagist/v/:vendor/:package_name.svg?style=flat-square
71-
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
72-
[ico-travis]: https://img.shields.io/travis/:vendor/:package_name/master.svg?style=flat-square
73-
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/:vendor/:package_name.svg?style=flat-square
74-
[ico-code-quality]: https://img.shields.io/scrutinizer/g/:vendor/:package_name.svg?style=flat-square
75-
[ico-downloads]: https://img.shields.io/packagist/dt/:vendor/:package_name.svg?style=flat-square
35+
## Change log
7636

77-
[link-packagist]: https://packagist.org/packages/:vendor/:package_name
78-
[link-travis]: https://travis-ci.org/:vendor/:package_name
79-
[link-scrutinizer]: https://scrutinizer-ci.com/g/:vendor/:package_name/code-structure
80-
[link-code-quality]: https://scrutinizer-ci.com/g/:vendor/:package_name
81-
[link-downloads]: https://packagist.org/packages/:vendor/:package_name
82-
[link-author]: https://github.com/:author_username
83-
[link-contributors]: ../../contributors
37+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

composer.json

+1-21
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,18 @@
1919
],
2020
"require": {
2121
"illuminate/support": ">=5.1",
22-
"php": ">=5.5.9"
23-
},
24-
"require-dev": {
25-
"phpunit/phpunit" : ">=5.4.3",
26-
"squizlabs/php_codesniffer": "^2.3"
22+
"php" : "~5.6|~7.0",
2723
},
2824
"autoload": {
2925
"psr-4": {
3026
"MahdiMajidzadeh\\Persianalize\\": "src"
3127
}
3228
},
33-
"autoload-dev": {
34-
"psr-4": {
35-
"MahdiMajidzadeh\\Persianalize\\": "tests"
36-
}
37-
},
38-
"scripts": {
39-
"test": "phpunit",
40-
"check-style": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
41-
"fix-style": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests"
42-
},
4329
"extra": {
44-
"branch-alias": {
45-
"dev-master": "1.0-dev"
46-
},
4730
"laravel": {
4831
"providers": [
4932
"MahdiMajidzadeh\\Persianalize\\PersianalizeServiceProvider"
5033
]
5134
}
52-
},
53-
"config": {
54-
"sort-packages": true
5535
}
5636
}

prefill.php

-130
This file was deleted.

src/Persian.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace mahdimajidzadeh\persianalize;
3+
namespace MahdiMajidzadeh\Persianalize;
44

55
class Persian
66
{

src/PersianalizeServiceProvider.php

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
<?php
22

3-
namespace mahdiMajidzadeh\persianalize;
3+
namespace MahdiMajidzadeh\Persianalize;
44

55
use Illuminate\Support\ServiceProvider;
66

77
class PersianalizeServiceProvider extends ServiceProvider
88
{
9-
/**
10-
* Perform post-registration booting of services.
11-
*
12-
* @return void
13-
*/
149
public function boot()
1510
{
1611
//
1712
}
1813

19-
/**
20-
* Register any package services.
21-
*
22-
* @return void
23-
*/
2414
public function register()
2515
{
2616
//

0 commit comments

Comments
 (0)