Download the PHP package saritasa/laravel-controllers without Composer
On this page you can find all versions of the php package saritasa/laravel-controllers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-controllers
Laravel Controllers
Controllers for common UI and endpoints in Laravel,
like API authentication, password change, login page, etc.
Laravel 9.x/10.x
Install the package:
Available controllers
There are 2 types of controllers:
- Web - interactive UI for user - traditional Laravel controllers.
Many of them just provide out-of-the-box Laravel functionality,
using built-in traits. - Api - for programmatic integration with 3d party applications,
like mobile apps (iOS, Android) or single-page HTML applications,
built on modern frontend frameworks - React.JS, AngularJS, VueJs, etc.
API utilizes Dingo/Api library
and custom extensions for it: saritasa/dingo-api-custom
Controllers, described below, exist, but you must register routes for them manually
Methods
- function json($data, IDataTransformer $transformer = null): Response
Example:
JWTAuthApiController Authenticate API Controller. Uses JWT authentication
Utilizes Dingo\Api JWT Auth
settings and underlying tymon\jwt-auth
Example: routes\api.php:
Customize login request
In some case, we're using email
field for login with email
or username
in application. So, the email
field should validation by required
and string
rule.
Or you want to use username
instead of email
.
How to bind ILoginRequest with custom request class
ForgotPasswordApiController, ResetPasswordApiController These controllers are responsible for handling password reset emails.
Utilize native Laravel password management without UI, in JSON API.
Example: routes\api.php:
Contributing
- Create fork, checkout it
- Develop locally as usual. Code must follow PSR-1, PSR-2 -
run PHP_CodeSniffer to ensure, that code follows style guides - Cover added functionality with unit tests and run PHPUnit to make sure, that all tests pass
- Update README.md to describe new or changed functionality
- Add changes description to Semantic Versioning convention to determine next version number.
- When ready, create pull request
Make shortcuts
If you have GNU Make installed, you can use following shortcuts:
- (instead of ) -
run static code analysis with PHP_CodeSniffer
to check code style - (instead of ) -
fix code style violations with PHP_CodeSniffer
automatically, where possible (ex. PSR-2 code formatting violations) - (instead of ) -
run tests with PHPUnit -
- instead of * or just without parameters -
invokes described above install, cs, test tasks sequentially -
project will be assembled, checked with linter and tested with one single command
- instead of * or just without parameters -
Resources
- Bug Tracker
- Code
- Changes History
- Authors
All versions of laravel-controllers with dependencies
ext-json Version *
illuminate/support Version >=5.7 <12.0
saritasa/transformers Version 1.2.2
php-open-source-saver/jwt-auth Version ^2.3
saritasa/laravel-entity-services Version ^2.0