Skip to content

Commit 38ccd8e

Browse files
committed
initial commit
1 parent ded0058 commit 38ccd8e

22 files changed

+132
-396
lines changed

.github/ISSUE_TEMPLATE/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Ask a question
4-
url: https://github.com/:vendor_name/:package_name/discussions/new?category=q-a
4+
url: https://github.com/sawirricardo/laravel-api2pdf/discussions/new?category=q-a
55
about: Ask the community for help
66
- name: Request a feature
7-
url: https://github.com/:vendor_name/:package_name/discussions/new?category=ideas
7+
url: https://github.com/sawirricardo/laravel-api2pdf/discussions/new?category=ideas
88
about: Share ideas for new features
99
- name: Report a security issue
10-
url: https://github.com/:vendor_name/:package_name/security/policy
10+
url: https://github.com/sawirricardo/laravel-api2pdf/security/policy
1111
about: Learn how to notify us for sensitive bugs
1212
- name: Report a bug
13-
url: https://github.com/:vendor_name/:package_name/issues/new
13+
url: https://github.com/sawirricardo/laravel-api2pdf/issues/new
1414
about: Report a reproducable bug

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Changelog
22

3-
All notable changes to `:package_name` will be documented in this file.
3+
All notable changes to `laravel-api2pdf` will be documented in this file.

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) :vendor_name <author@domain.com>
3+
Copyright (c) sawirricardo <sawir.ricardo@gmail.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+16-37
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
1-
21
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/support-ukraine.svg?t=1" />](https://supportukrainenow.org)
32

4-
# :package_description
5-
6-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
7-
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/:vendor_slug/:package_slug/run-tests?label=tests)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3Arun-tests+branch%3Amain)
8-
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/:vendor_slug/:package_slug/Check%20&%20fix%20styling?label=code%20style)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)
9-
[![Total Downloads](https://img.shields.io/packagist/dt/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
10-
<!--delete-->
11-
---
12-
This repo can be used to scaffold a Laravel package. Follow these steps to get started:
13-
14-
1. Press the "Use this template" button at the top of this repo to create a new repo with the contents of this skeleton.
15-
2. Run "php ./configure.php" to run a script that will replace all placeholders throughout all the files.
16-
3. Have fun creating your package.
17-
4. If you need help creating a package, consider picking up our <a href="https://laravelpackage.training">Laravel Package Training</a> video course.
18-
---
19-
<!--/delete-->
3+
# [Api2pdf](https://api2pdf.com) wrapper
4+
5+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/sawirricardo/laravel-api2pdf.svg?style=flat-square)](https://packagist.org/packages/sawirricardo/laravel-api2pdf)
6+
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/sawirricardo/laravel-api2pdf/run-tests?label=tests)](https://github.com/sawirricardo/laravel-api2pdf/actions?query=workflow%3Arun-tests+branch%3Amain)
7+
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/sawirricardo/laravel-api2pdf/Check%20&%20fix%20styling?label=code%20style)](https://github.com/sawirricardo/laravel-api2pdf/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)
8+
[![Total Downloads](https://img.shields.io/packagist/dt/sawirricardo/laravel-api2pdf.svg?style=flat-square)](https://packagist.org/packages/sawirricardo/laravel-api2pdf)
9+
2010
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
2111

2212
## Support us
2313

24-
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/:package_name.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/:package_name)
14+
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/laravel-api2pdf.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/laravel-api2pdf)
2515

2616
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
2717

@@ -32,40 +22,29 @@ We highly appreciate you sending us a postcard from your hometown, mentioning wh
3222
You can install the package via composer:
3323

3424
```bash
35-
composer require :vendor_slug/:package_slug
36-
```
37-
38-
You can publish and run the migrations with:
39-
40-
```bash
41-
php artisan vendor:publish --tag=":package_slug-migrations"
42-
php artisan migrate
25+
composer require sawirricardo/laravel-api2pdf
4326
```
4427

4528
You can publish the config file with:
4629

4730
```bash
48-
php artisan vendor:publish --tag=":package_slug-config"
31+
php artisan vendor:publish --tag="laravel-api2pdf-config"
4932
```
5033

5134
This is the contents of the published config file:
5235

5336
```php
5437
return [
38+
'api_key'=> env('API2PDF_API_KEY'),
5539
];
5640
```
5741

58-
Optionally, you can publish the views using
59-
60-
```bash
61-
php artisan vendor:publish --tag=":package_slug-views"
62-
```
63-
6442
## Usage
6543

6644
```php
67-
$variable = new VendorName\Skeleton();
68-
echo $variable->echoPhrase('Hello, VendorName!');
45+
// @see https://github.com/Api2Pdf/api2pdf.php
46+
$result = api2pdf()->chromeHtmlToPdf('<p>Hello, World</p>');
47+
echo $result->getFile();
6948
```
7049

7150
## Testing
@@ -88,8 +67,8 @@ Please review [our security policy](../../security/policy) on how to report secu
8867

8968
## Credits
9069

91-
- [:author_name](https://github.com/:author_username)
92-
- [All Contributors](../../contributors)
70+
- [sawirricardo](https://github.com/sawirricardo)
71+
- [All Contributors](../../contributors)
9372

9473
## License
9574

composer.json

+20-15
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
{
2-
"name": ":vendor_slug/:package_slug",
3-
"description": ":package_description",
2+
"name": "sawirricardo/laravel-api2pdf",
3+
"description": "This is my package laravel-api2pdf",
44
"keywords": [
5-
":vendor_name",
5+
"sawirricardo",
66
"laravel",
7-
":package_slug"
7+
"laravel-api2pdf"
88
],
9-
"homepage": "https://github.com/:vendor_slug/:package_slug",
9+
"homepage": "https://github.com/sawirricardo/laravel-api2pdf",
1010
"license": "MIT",
1111
"authors": [
1212
{
13-
"name": ":author_name",
14-
"email": "author@domain.com",
13+
"name": "sawirricardo",
14+
"email": "sawir.ricardo@gmail.com",
1515
"role": "Developer"
1616
}
1717
],
1818
"require": {
1919
"php": "^8.1",
20-
"spatie/laravel-package-tools": "^1.9.2",
21-
"illuminate/contracts": "^9.0"
20+
"api2pdf/api2pdf.php": "^2.0",
21+
"illuminate/contracts": "^9.0",
22+
"spatie/laravel-package-tools": "^1.9.2"
2223
},
2324
"require-dev": {
2425
"friendsofphp/php-cs-fixer": "^3.8",
@@ -35,13 +36,13 @@
3536
},
3637
"autoload": {
3738
"psr-4": {
38-
"VendorName\\Skeleton\\": "src",
39-
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories"
39+
"Sawirricardo\\Laravel\\Api2pdf\\": "src",
40+
"Sawirricardo\\Laravel\\Api2pdf\\Database\\Factories\\": "database/factories"
4041
}
4142
},
4243
"autoload-dev": {
4344
"psr-4": {
44-
"VendorName\\Skeleton\\Tests\\": "tests"
45+
"Sawirricardo\\Laravel\\Api2pdf\\Tests\\": "tests"
4546
}
4647
},
4748
"scripts": {
@@ -51,15 +52,19 @@
5152
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
5253
},
5354
"config": {
54-
"sort-packages": true
55+
"sort-packages": true,
56+
"allow-plugins": {
57+
"pestphp/pest-plugin": true,
58+
"phpstan/extension-installer": true
59+
}
5560
},
5661
"extra": {
5762
"laravel": {
5863
"providers": [
59-
"VendorName\\Skeleton\\SkeletonServiceProvider"
64+
"Sawirricardo\\Api2pdf\\Api2pdfServiceProvider"
6065
],
6166
"aliases": {
62-
"Skeleton": "VendorName\\Skeleton\\Facades\\Skeleton"
67+
"Api2pdf": "Sawirricardo\\Api2pdf\\Facades\\Api2pdf"
6368
}
6469
}
6570
},

config/api2pdf.php

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
// config for Sawirricardo/Api2pdf
4+
return [
5+
'api_key' => env('API2PDF_API_KEY'),
6+
];

config/skeleton.php

-5
This file was deleted.

0 commit comments

Comments
 (0)