Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sawirricardo committed May 27, 2022
1 parent ded0058 commit 38ccd8e
Show file tree
Hide file tree
Showing 22 changed files with 132 additions and 396 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/:vendor_name/:package_name/discussions/new?category=q-a
url: https://github.com/sawirricardo/laravel-api2pdf/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/:vendor_name/:package_name/discussions/new?category=ideas
url: https://github.com/sawirricardo/laravel-api2pdf/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/:vendor_name/:package_name/security/policy
url: https://github.com/sawirricardo/laravel-api2pdf/security/policy
about: Learn how to notify us for sensitive bugs
- name: Report a bug
url: https://github.com/:vendor_name/:package_name/issues/new
url: https://github.com/sawirricardo/laravel-api2pdf/issues/new
about: Report a reproducable bug
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog

All notable changes to `:package_name` will be documented in this file.
All notable changes to `laravel-api2pdf` will be documented in this file.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

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

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
53 changes: 16 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@

[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/support-ukraine.svg?t=1" />](https://supportukrainenow.org)

# :package_description

[![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)
[![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)
[![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)
[![Total Downloads](https://img.shields.io/packagist/dt/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
<!--delete-->
---
This repo can be used to scaffold a Laravel package. Follow these steps to get started:

1. Press the "Use this template" button at the top of this repo to create a new repo with the contents of this skeleton.
2. Run "php ./configure.php" to run a script that will replace all placeholders throughout all the files.
3. Have fun creating your package.
4. If you need help creating a package, consider picking up our <a href="https://laravelpackage.training">Laravel Package Training</a> video course.
---
<!--/delete-->
# [Api2pdf](https://api2pdf.com) wrapper

[![Latest Version on Packagist](https://img.shields.io/packagist/v/sawirricardo/laravel-api2pdf.svg?style=flat-square)](https://packagist.org/packages/sawirricardo/laravel-api2pdf)
[![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)
[![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)
[![Total Downloads](https://img.shields.io/packagist/dt/sawirricardo/laravel-api2pdf.svg?style=flat-square)](https://packagist.org/packages/sawirricardo/laravel-api2pdf)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

## Support us

[<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)
[<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)

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).

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

```bash
composer require :vendor_slug/:package_slug
```

You can publish and run the migrations with:

```bash
php artisan vendor:publish --tag=":package_slug-migrations"
php artisan migrate
composer require sawirricardo/laravel-api2pdf
```

You can publish the config file with:

```bash
php artisan vendor:publish --tag=":package_slug-config"
php artisan vendor:publish --tag="laravel-api2pdf-config"
```

This is the contents of the published config file:

```php
return [
'api_key'=> env('API2PDF_API_KEY'),
];
```

Optionally, you can publish the views using

```bash
php artisan vendor:publish --tag=":package_slug-views"
```

## Usage

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

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

## Credits

- [:author_name](https://github.com/:author_username)
- [All Contributors](../../contributors)
- [sawirricardo](https://github.com/sawirricardo)
- [All Contributors](../../contributors)

## License

Expand Down
35 changes: 20 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
{
"name": ":vendor_slug/:package_slug",
"description": ":package_description",
"name": "sawirricardo/laravel-api2pdf",
"description": "This is my package laravel-api2pdf",
"keywords": [
":vendor_name",
"sawirricardo",
"laravel",
":package_slug"
"laravel-api2pdf"
],
"homepage": "https://github.com/:vendor_slug/:package_slug",
"homepage": "https://github.com/sawirricardo/laravel-api2pdf",
"license": "MIT",
"authors": [
{
"name": ":author_name",
"email": "author@domain.com",
"name": "sawirricardo",
"email": "sawir.ricardo@gmail.com",
"role": "Developer"
}
],
"require": {
"php": "^8.1",
"spatie/laravel-package-tools": "^1.9.2",
"illuminate/contracts": "^9.0"
"api2pdf/api2pdf.php": "^2.0",
"illuminate/contracts": "^9.0",
"spatie/laravel-package-tools": "^1.9.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.8",
Expand All @@ -35,13 +36,13 @@
},
"autoload": {
"psr-4": {
"VendorName\\Skeleton\\": "src",
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories"
"Sawirricardo\\Laravel\\Api2pdf\\": "src",
"Sawirricardo\\Laravel\\Api2pdf\\Database\\Factories\\": "database/factories"
}
},
"autoload-dev": {
"psr-4": {
"VendorName\\Skeleton\\Tests\\": "tests"
"Sawirricardo\\Laravel\\Api2pdf\\Tests\\": "tests"
}
},
"scripts": {
Expand All @@ -51,15 +52,19 @@
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"phpstan/extension-installer": true
}
},
"extra": {
"laravel": {
"providers": [
"VendorName\\Skeleton\\SkeletonServiceProvider"
"Sawirricardo\\Api2pdf\\Api2pdfServiceProvider"
],
"aliases": {
"Skeleton": "VendorName\\Skeleton\\Facades\\Skeleton"
"Api2pdf": "Sawirricardo\\Api2pdf\\Facades\\Api2pdf"
}
}
},
Expand Down
6 changes: 6 additions & 0 deletions config/api2pdf.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

// config for Sawirricardo/Api2pdf
return [
'api_key' => env('API2PDF_API_KEY'),
];
5 changes: 0 additions & 5 deletions config/skeleton.php

This file was deleted.

Loading

0 comments on commit 38ccd8e

Please sign in to comment.