Skip to content

Commit

Permalink
Fixed Installation Error
Browse files Browse the repository at this point in the history
  • Loading branch information
cybersai committed Feb 10, 2020
1 parent 81f06fc commit 7e0853b
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 133 deletions.
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All notable changes to `LaravelUSSD` will be documented in this file.
All notable changes to `LaravelUssd` will be documented in this file.

## Version 1.0

Expand Down
33 changes: 15 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,44 @@
{
"name": "cybersai/laravel-ussd",
"description": "A Laravel package that speed up the development process for USSD",
"name": "cybersai/laravelussd",
"description": "Quick Ussd apps",
"license": "MIT",
"authors": [
{
"name": "Isaac Adzah Sai",
"email": "isaacsai030@gmail.com",
"role": "Developer"
"homepage": "author homepage"
}
],
"homepage": "https://github.com/cybersai/laravelussd",
"keywords": [
"laravel",
"laravel-ussd",
"ussd",
"framework"
],
"minimum-stability": "alpha",
"keywords": ["Laravel", "LaravelUssd"],
"require": {
"illuminate/support": "~5|~6",
"cybersai/ussd": "~1.2"
"cybersai/ussd": "@dev"
},
"require-dev": {
"phpunit/phpunit": "~7.0",
"phpunit/phpunit": "^8.0",
"mockery/mockery": "^1.1",
"orchestra/testbench": "~3.0",
"orchestra/testbench": "~3|~4",
"sempro/phpunit-pretty-print": "^1.0"
},
"autoload": {
"psr-4": {
"CyberSai\\LaravelUssd\\": "src/"
"Cybersai\\LaravelUssd\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"CyberSai\\LaravelUssd\\Tests\\": "tests"
"Cybersai\\LaravelUssd\\Tests\\": "tests"
}
},
"extra": {
"laravel": {
"providers": [
"CyberSai\\LaravelUssd\\UssdServiceProvider"
]
"Cybersai\\LaravelUssd\\LaravelUssdServiceProvider"
],
"aliases": {
"LaravelUssd": "Cybersai\\LaravelUssd\\Facades\\LaravelUssd"
}
}
}
}
}
4 changes: 2 additions & 2 deletions config/ussd.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

return [
'provider' => env('USSD_PROVIDER', 'korba')
];
//
];
81 changes: 12 additions & 69 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,22 @@
# Laravel USSD Package
# LaravelUssd

[![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]

Easily build USSD apps with PHP[Laravel].
This is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list.

## Installation

You can install the package via composer:
Via Composer

``` bash
$ composer require cybersai/laravel-ussd
$ composer require cybersai/laravelussd
```

The package will automatically register itself.

You can optionally publish the config file with:
```bash
php artisan vendor:publish --provider="CyberSai\LaravelUssd\UssdServiceProvider"
```

This is the contents of the published config file:

```php
return [
'provider' => env('USSD_PROVIDER', 'korba')
];
```

**Update your `.env` file with the USSD provider key value pair**
```bash
USSD_PROVIDER=
```

Supported USSD providers [Ghana]:
* [korba](http://korbaweb.com)
* [hubtel](https://developers.hubtel.com/docs/getting-started-with-ussd)
* [nsano](https://www.nsano.com)
* [txtghana](https://www.txtghana.com)

## Usage

**Create USSD Controller**
```bash
php artisan ussd:controller filename
```

**Create USSD Migration**
```bash
php artisan ussd:migration tablename
```

**Create USSD Model**
```bash
php artisan ussd:model classname
```

**Create USSD List View**
```bash
php artisan ussd:view-list filename
```

**Create USSD Simple View**
```bash
php artisan ussd:view-simple filename
```

**Create USSD Titled View**
```bash
php artisan ussd:view-titled filename
```

## Change log

Please see the [changelog](changelog.md) for more information on what has changed recently.
Expand All @@ -93,22 +38,20 @@ If you discover any security related issues, please email isaacsai030@gmail.com
## Credits

- [Isaac Adzah Sai][link-author]
- [Benjamin Manford][link-author2]
- [All Contributors][link-contributors]

## License

MIT. Please see the [license file](license.md) for more information.

[ico-version]: https://img.shields.io/packagist/v/cybersai/laravel-ussd.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/cybersai/laravel-ussd.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/cybersai/laravel-ussd/master.svg?style=flat-square
[ico-version]: https://img.shields.io/packagist/v/cybersai/laravelussd.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/cybersai/laravelussd.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/cybersai/laravelussd/master.svg?style=flat-square
[ico-styleci]: https://styleci.io/repos/12345678/shield

[link-packagist]: https://packagist.org/packages/cybersai/laravel-ussd
[link-downloads]: https://packagist.org/packages/cybersai/laravel-ussd
[link-travis]: https://travis-ci.org/cybersai/laravel-ussd
[link-packagist]: https://packagist.org/packages/cybersai/laravelussd
[link-downloads]: https://packagist.org/packages/cybersai/laravelussd
[link-travis]: https://travis-ci.org/cybersai/laravelussd
[link-styleci]: https://styleci.io/repos/12345678
[link-author]: https://github.com/cybersai
[link-author2]: https://github.com/manfordbenjamin
[link-contributors]: https://github.com/CyberSai/laravel-ussd/graphs/contributors
[link-contributors]: ../../contributors
3 changes: 1 addition & 2 deletions src/Console/Commands/CreateController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?php

namespace CyberSai\LaravelUSSD\Console\Commands;
namespace Cybersai\LaravelUssd\Console\Commands;

use Illuminate\Console\GeneratorCommand;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Str;

class CreateController extends GeneratorCommand
{
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Commands/CreateListView.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CyberSai\LaravelUSSD\Console\Commands;
namespace Cybersai\LaravelUssd\Console\Commands;

use Illuminate\Console\GeneratorCommand;

Expand All @@ -24,7 +24,7 @@ class CreateListView extends GeneratorCommand

protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace.'\Ussd';
return $rootNamespace.'\Ussd\Views';
}

protected function getStub()
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/CreateMigration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CyberSai\LaravelUSSD\Console\Commands;
namespace Cybersai\LaravelUssd\Console\Commands;

use Illuminate\Console\GeneratorCommand;
use Illuminate\Support\Str;
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/CreateModel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CyberSai\LaravelUSSD\Console\Commands;
namespace Cybersai\LaravelUssd\Console\Commands;

use Illuminate\Console\GeneratorCommand;

Expand Down
4 changes: 2 additions & 2 deletions src/Console/Commands/CreateSimpleView.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CyberSai\LaravelUSSD\Console\Commands;
namespace Cybersai\LaravelUssd\Console\Commands;

use Illuminate\Console\GeneratorCommand;

Expand Down Expand Up @@ -29,6 +29,6 @@ protected function getStub()

protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace.'\Ussd';
return $rootNamespace.'\Ussd\Views';
}
}
4 changes: 2 additions & 2 deletions src/Console/Commands/CreateTitledView.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CyberSai\LaravelUSSD\Console\Commands;
namespace Cybersai\LaravelUssd\Console\Commands;

use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Input\InputOption;
Expand All @@ -25,7 +25,7 @@ class CreateTitledView extends GeneratorCommand

protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace.'\Ussd';
return $rootNamespace.'\Ussd\Views';
}

protected function getStub()
Expand Down
8 changes: 6 additions & 2 deletions src/Console/Commands/CreateViewGroup.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CyberSai\LaravelUSSD\Console\Commands;
namespace Cybersai\LaravelUssd\Console\Commands;

use Illuminate\Console\GeneratorCommand;

Expand All @@ -11,7 +11,7 @@ class CreateViewGroup extends GeneratorCommand
*
* @var string
*/
protected $name = 'command:name';
protected $name = 'ussd:view-group';

/**
* The console command description.
Expand All @@ -27,4 +27,8 @@ protected function getStub()
return __DIR__.'/Stubs/ussd_view_group.stub';
}

protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace.'\Ussd\ViewGroups';
}
}
9 changes: 7 additions & 2 deletions src/Console/Commands/CreateViewValidator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace CyberSai\LaravelUSSD\Console\Commands;
namespace Cybersai\LaravelUssd\Console\Commands;

use Illuminate\Console\GeneratorCommand;

Expand All @@ -12,7 +12,7 @@ class CreateViewValidator extends GeneratorCommand
*
* @var string
*/
protected $name = 'command:name';
protected $name = 'ussd:validator';

/**
* The console command description.
Expand All @@ -27,4 +27,9 @@ protected function getStub()
{
return __DIR__.'/Stubs/ussd_view_validator.stub';
}

protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace.'\Ussd\Validators';
}
}
18 changes: 18 additions & 0 deletions src/Facades/Ussd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Cybersai\LaravelUssd\Facades;

use Illuminate\Support\Facades\Facade;

class Ussd extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'laravelussd';
}
}
8 changes: 8 additions & 0 deletions src/Ussd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Cybersai\LaravelUssd;

class Ussd
{
// Build wonderful things
}
Loading

0 comments on commit 7e0853b

Please sign in to comment.