generated from spatie/package-skeleton-laravel
-
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.
feat: add lti provider build with laravel eloquent
- Loading branch information
1 parent
bdc1cbd
commit 8843468
Showing
30 changed files
with
1,629 additions
and
237 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,3 +1,22 @@ | ||
# Changelog | ||
|
||
All notable changes to `:package_name` will be documented in this file. | ||
All notable changes to `laravel-elastic` will be documented in this file. | ||
|
||
Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) principles. | ||
|
||
## NEXT - YYYY-MM-DD | ||
|
||
### Added | ||
- Nothing | ||
|
||
### Deprecated | ||
- Nothing | ||
|
||
### Fixed | ||
- Nothing | ||
|
||
### Removed | ||
- Nothing | ||
|
||
### Security | ||
- Nothing |
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributor Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to make participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at `[email protected]`. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Contributing | ||
|
||
Contributions are **welcome** and will be fully **credited**. | ||
|
||
We accept contributions via Pull Requests on [Github](https://github.com/swisnl/laravel-elastic). | ||
|
||
|
||
## Pull Requests | ||
|
||
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``. | ||
|
||
- **Add tests!** - Your patch won't be accepted if it doesn't have tests. | ||
|
||
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. | ||
|
||
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. | ||
|
||
- **Create feature branches** - Don't ask us to pull from your master branch. | ||
|
||
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. | ||
|
||
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. | ||
|
||
|
||
## Running Tests | ||
|
||
``` bash | ||
$ composer test | ||
``` | ||
|
||
|
||
**Happy coding**! |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- Provide a general summary of the issue in the Title above --> | ||
|
||
## Detailed description | ||
|
||
Provide a detailed description of the change or addition you are proposing. | ||
|
||
Make it clear if the issue is a bug, an enhancement or just a question. | ||
|
||
## Context | ||
|
||
Why is this change important to you? How would you use it? | ||
|
||
How can it benefit other users? | ||
|
||
## Possible implementation | ||
|
||
Not obligatory, but suggest an idea for implementing addition or change. | ||
|
||
## Your environment | ||
|
||
Include as many relevant details about the environment you experienced the bug in and how to reproduce it. | ||
|
||
* Version used (e.g. PHP 5.6, HHVM 3): | ||
* Operating system and version (e.g. Ubuntu 16.04, Windows 7): | ||
* Link to your project: | ||
* ... | ||
* ... |
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,21 +1,21 @@ | ||
The MIT License (MIT) | ||
# The MIT License (MIT) | ||
|
||
Copyright (c) :vendor_name <[email protected]> | ||
Copyright (c) 2023 SWIS BV | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy | ||
> of this software and associated documentation files (the "Software"), to deal | ||
> in the Software without restriction, including without limitation the rights | ||
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
> copies of the Software, and to permit persons to whom the Software is | ||
> furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in | ||
> all copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
> THE SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!--- Provide a general summary of your changes in the Title above --> | ||
|
||
## Description | ||
|
||
Describe your changes in detail. | ||
|
||
## Motivation and context | ||
|
||
Why is this change required? What problem does it solve? | ||
|
||
If it fixes an open issue, please link to the issue here (if you write `fixes #num` | ||
or `closes #num`, the issue will be automatically closed when the pull is accepted.) | ||
|
||
## How has this been tested? | ||
|
||
Please describe in detail how you tested your changes. | ||
|
||
Include details of your testing environment, and the tests you ran to | ||
see how your change affects other areas of the code, etc. | ||
|
||
## Screenshots (if appropriate) | ||
|
||
## Types of changes | ||
|
||
What types of changes does your code introduce? Put an `x` in all the boxes that apply: | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to change) | ||
|
||
## Checklist: | ||
|
||
Go over all the following points, and put an `x` in all the boxes that apply. | ||
|
||
Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our [continuous integration](http://www.phptherightway.com/#continuous-integration) server to make sure your [tests and code style pass](https://help.github.com/articles/about-required-status-checks/). | ||
|
||
- [ ] I have read the **[CONTRIBUTING](CONTRIBUTING.md)** document. | ||
- [ ] My pull request addresses exactly one patch/feature. | ||
- [ ] I have created a branch for this patch/feature. | ||
- [ ] Each individual commit in the pull request is meaningful. | ||
- [ ] I have added tests to cover my changes. | ||
- [ ] If my change requires a change to the documentation, I have updated it accordingly. | ||
|
||
If you're unsure about any of these, don't hesitate to ask. We're here to help! |
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,93 +1,75 @@ | ||
# :package_description | ||
# laravel-elastic | ||
|
||
[![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/actions/workflow/status/:vendor_slug/:package_slug/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3Arun-tests+branch%3Amain) | ||
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/:vendor_slug/:package_slug/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3A"Fix+PHP+code+style+issues"+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: | ||
[![Latest Version on Packagist][ico-version]][link-packagist] | ||
[![Software License][ico-license]](LICENSE.md) | ||
[![Buy us a tree][ico-treeware]][link-treeware] | ||
[![Build Status][ico-github-actions]][link-github-actions] | ||
[![Total Downloads][ico-downloads]][link-downloads] | ||
[![Made by SWIS][ico-swis]][link-swis] | ||
|
||
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--> | ||
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. | ||
|
||
## Support us | ||
Laravel package that implements elasticsearch in an easy way. Index various models via the `SyncsWithIndex` trait and customize further by extending the `Document` and `SearchResult` class. | ||
|
||
[<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) | ||
|
||
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). | ||
|
||
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards). | ||
## Install | ||
|
||
## Installation | ||
Via Composer | ||
|
||
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 | ||
``` | ||
|
||
You can publish the config file with: | ||
|
||
```bash | ||
php artisan vendor:publish --tag=":package_slug-config" | ||
``` | ||
|
||
This is the contents of the published config file: | ||
|
||
```php | ||
return [ | ||
]; | ||
``` | ||
|
||
Optionally, you can publish the views using | ||
|
||
```bash | ||
php artisan vendor:publish --tag=":package_slug-views" | ||
``` bash | ||
$ composer require swisnl/laravel-elasticsearch | ||
``` | ||
|
||
## Usage | ||
|
||
```php | ||
$variable = new VendorName\Skeleton(); | ||
echo $variable->echoPhrase('Hello, VendorName!'); | ||
implemnent the LtiClient interface to your oauth2 client model. Implement the methods and add the following attributes to the model | ||
``` | ||
|
||
## Testing | ||
|
||
```bash | ||
composer test | ||
'lti_platform_id', | ||
'lti_client_id', | ||
'lti_deployment_id', | ||
'lti_version', | ||
'lti_signature_method', | ||
'lti_profile', | ||
'lti_settings', | ||
'lti_user_type' | ||
``` | ||
|
||
## Changelog | ||
## Change log | ||
|
||
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. | ||
|
||
## Contributing | ||
|
||
Please see [CONTRIBUTING](CONTRIBUTING.md) for details. | ||
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details. | ||
|
||
## Security Vulnerabilities | ||
## Security | ||
|
||
Please review [our security policy](../../security/policy) on how to report security vulnerabilities. | ||
If you discover any security related issues, please email security@swis.nl instead of using the issue tracker. | ||
|
||
## Credits | ||
|
||
- [:author_name](https://github.com/:author_username) | ||
- [All Contributors](../../contributors) | ||
- [Thomas Wijnands][link-author] | ||
- [All Contributors][link-contributors] | ||
|
||
## License | ||
|
||
The MIT License (MIT). Please see [License File](LICENSE.md) for more information. | ||
|
||
This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**][link-treeware] to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats. | ||
|
||
## SWIS :heart: Open Source | ||
|
||
[SWIS][link-swis] is a web agency from Leiden, the Netherlands. We love working with open source software. | ||
|
||
[ico-version]: https://img.shields.io/packagist/v/swisnl/laravel-elasticsearch.svg?style=flat-square | ||
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square | ||
[ico-treeware]: https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen.svg?style=flat-square | ||
[ico-github-actions]: https://img.shields.io/github/actions/workflow/status/swisnl/laravel-elasticsearch/tests.yml?label=tests&branch=master&style=flat-square | ||
[ico-downloads]: https://img.shields.io/packagist/dt/swisnl/laravel-elasticsearch.svg?style=flat-square | ||
[ico-swis]: https://img.shields.io/badge/%F0%9F%9A%80-made%20by%20SWIS-%230737A9.svg?style=flat-square | ||
|
||
[link-packagist]: https://packagist.org/packages/swisnl/laravel-elasticsearch | ||
[link-github-actions]: https://github.com/swisnl/laravel-elasticsearch/actions/workflows/tests.yml | ||
[link-downloads]: https://packagist.org/packages/swisnl/laravel-elasticsearch | ||
[link-treeware]: https://plant.treeware.earth/swisnl/laravel-elasticsearch | ||
[link-author]: https://github.com/tommie1001 | ||
[link-contributors]: ../../contributors | ||
[link-swis]: https://www.swis.nl |
Oops, something went wrong.