Download the PHP package omaralalwi/laravel-api-helpers without Composer

On this page you can find all versions of the php package omaralalwi/laravel-api-helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-api-helpers

Laravel API Helpers πŸš€

Laravel API Helpers is a collection of helper functions designed to streamline API development with Laravel. It enables you to easily detect API versions, validate requests, and access useful request detailsβ€”all while keeping your code clean and maintainable. ✨

Latest Version PHP Version License

## 🌟 Features - **API Version Detection:** Determine the API version from the request URL or headers. - **API Version Validation:** Check if the current request matches or exceeds a specified API version. - **API Request Identification:** Identify if a request is targeting the API. - **Request Helpers:** Retrieve client IP, locale, token, content type, headers, and check for secure requests. - **Authentication Helpers:** Determine API authentication status and retrieve the authenticated user. ## πŸ“‹ Requirements - PHP 7.4 or higher - Laravel 7.x or higher ## πŸ› οΈ Installation Install the package via Composer: ## πŸ“¦ Usage The helper functions are globally available throughout your Laravel application. You can call them anywhereβ€”controllers, middleware, or routes or blade files. --- ## πŸ“š API Helper Functions Guide ### πŸ” . `get_api_v()` Extracts the API version from the current request by inspecting the URL (e.g., `api/v4`) or the `Accept-Version` header. --- ### βœ… . `is_api_v($version)` Determines if the current request is for a specific API version by comparing the detected version with the provided one. --- ### ⏫ . `api_v_at_least($version)` Checks whether the current API version is at least a specified minimum version. --- ### 🌐 . `is_api_request()` Determines whether the current request is an API request by examining the URL, expected JSON responses, and the presence of specific API headers. --- ### πŸ“‘ . `get_client_ip()` Retrieves the client's IP address from the current request. --- ### 🌍 . `get_request_locale()` Gets the locale from the request's `Accept-Language` header. If not provided, it defaults to the application's locale. --- ### πŸ”‘ . `get_request_token()` Returns the bearer token from the current request's authorization header. --- ### πŸ“ . `get_request_content_type()` Retrieves the `Content-Type` header from the current request. --- ### πŸ”’ . `is_secure_request()` Checks whether the current request is made over a secure HTTPS connection. --- ### πŸ“‹ . `get_request_headers()` Returns all headers from the current request as an associative array. --- ### πŸ” . `is_api_authenticated()` Determines whether the API user is authenticated using the `api` guard. --- ### πŸ‘€ . `get_auth_user()` Retrieves the authenticated user from the default authentication guard. --- ### πŸ‘₯ . `get_api_user()` Returns the authenticated user using the `api` guard. --- ### Comprehensive Example For All Functions copy & past following block, then see outputs in log file --- ## Changelog See [CHANGELOG](CHANGELOG.md) for recent changes. ## Contributors ✨ Thanks to these wonderful people for contributing to this project! πŸ’–
Omar Al Alwi
Omar Al Alwi

πŸ† Creator
Want to contribute? Check out the [contributing guidelines](./CONTRIBUTING.md) and submit a pull request! πŸš€ ## Security If you discover any security-related issues, please email `[email protected]`. ## Credits - [Omar Alalwi](https://github.com/omaralalwi) ## License The MIT License (MIT). See [LICENSE](LICENSE.md) for more information. --- ## πŸ“š Helpful Open Source Packages & Projects ### Packages - lexi translate Lexi Translate simplify managing translations for multilingual Eloquent models with power of morph relationships and caching . - Gpdf Gpdf Open Source HTML to PDF converter for PHP & Laravel Applications, supports Arabic content out-of-the-box and other languages. - laravel Taxify **laravel Taxify** Laravel Taxify provides a set of helper functions and classes to simplify tax (VAT) calculations within Laravel applications. - laravel Taxify **laravel API Helpers** Laravel API Helpers provides a set of helper of helpful helper functions for API Requests .. - laravel Deployer **laravel Deployer** Streamlined Deployment for Laravel and Node.js apps, with Zero-Downtime and various environments and branches. - laravel Trash Cleaner **laravel Trash Cleaner** clean logs and debug files for debugging packages. - laravel Time Craft **laravel Time Craft** simple trait and helper functions that allow you, Effortlessly manage date and time queries in Laravel apps. - PHP builders **PHP builders** sample php traits to add ability to use builder design patterns with easy in PHP applications. - PhpPy - PHP Python **PhpPy - PHP Python** Interact with python in PHP applications. - Laravel Py - Laravel Python **Laravel Py - Laravel Python** interact with python in Laravel applications. - Deepseek PHP client **deepseek PHP client** robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities . - deepseek laravel **deepseek laravel** Laravel wrapper for Deepseek PHP client to seamless deepseek AI API integration with Laravel applications. - Qwen PHP client **Qwen PHP client** robust and community-driven PHP client library for seamless integration with the Qwen API . - qwen laravel **Laravel qwen** wrapper for qwen PHP client to seamless Alibaba qwen AI API integration with Laravel applications.. ### Dashboards - Laravel Startkit **Laravel Startkit** Laravel Admin Dashboard, Admin Template with Frontend Template, for scalable Laravel projects. - Kunafa Dashboard Vue **Kunafa Dashboard Vue** A feature-rich Vue.js 3 dashboard template with multi-language support and full RTL/LTR bidirectional layout capabilities. ### References - Clean Code Summary **Clean Code Summary** summarize and notes for books and practices about clean code. - SOLID Principles Summary **SOLID Principles Summary** summarize and notes for books about SOLID Principles.

All versions of laravel-api-helpers with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package omaralalwi/laravel-api-helpers contains the following files

Loading the files please wait ....