-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
204f73e
commit fd2b7bd
Showing
3 changed files
with
93 additions
and
9 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 |
---|---|---|
@@ -1 +1,78 @@ | ||
TODO | ||
# Laravel Fakturoid | ||
|
||
Simple wrapper for official php package https://github.com/fakturoid/fakturoid-php | ||
|
||
### Docs | ||
|
||
- [Installation](#installation) | ||
- [Configuration](#configuration) | ||
- [Examples](#examples) | ||
|
||
## Installation | ||
|
||
### Step 1: Install package | ||
|
||
Add the package in your composer.json by executing the command. | ||
|
||
```bash | ||
composer require dominik-wbz/laravel-fakturoid | ||
``` | ||
|
||
This will both update composer.json and install the package into the vendor/ directory. | ||
|
||
Next, add the service provider and facade to `config/app.php` | ||
|
||
Add the service provider to providers: | ||
|
||
``` | ||
'providers' => [ | ||
... | ||
WEBIZ\LaravelFakturoid\FakturoidServiceProvider::class, | ||
... | ||
] | ||
``` | ||
|
||
And add the facade to aliases: | ||
|
||
``` | ||
'aliases' => [ | ||
... | ||
'Fakturoid' => WEBIZ\LaravelFakturoid\Facade::class, | ||
... | ||
] | ||
``` | ||
|
||
### Step 2: Configuration | ||
|
||
First initialise the config file by running this command: | ||
|
||
```bash | ||
php artisan vendor:publish | ||
``` | ||
|
||
With this command, initialize the configuration and modify the created file, located under `config/fakturoid.php`. | ||
|
||
## Configuration | ||
|
||
```php | ||
return [ | ||
'account_name' => 'XXX', | ||
'account_email' => 'XXX', | ||
'account_api_key' => 'XXX', | ||
'app_contact' => 'PHPlib <your@email.cz>', | ||
]; | ||
``` | ||
|
||
## Examples | ||
|
||
### Create Subject | ||
|
||
```php | ||
|
||
\Fakturoid::createSubject(array('name' => 'Firma s.r.o.', 'email' => 'aloha@pokus.cz')); | ||
|
||
``` | ||
|
||
## License | ||
|
||
Copyright (c) 2019 webiz eu s.r.o MIT Licensed. |
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
return [ | ||
'app_name' => 'XXX', | ||
'app_email' => 'XXX', | ||
'app_api_key' => 'XXX', | ||
'account_name' => 'XXX', | ||
'account_email' => 'XXX', | ||
'account_api_key' => 'XXX', | ||
'app_contact' => 'PHPlib <your@email.cz>', | ||
]; |