Download the PHP package chandra-hemant/htkc-utils without Composer

On this page you can find all versions of the php package chandra-hemant/htkc-utils. 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 htkc-utils

Dynamic Search Function for Laravel: Handle Nested Relationships and Complex Queries

Overview

Introducing a powerful and flexible dynamic search function for Laravel applications, designed to simplify complex queries with nested and recursive relationship conditions. This package provides an elegant solution to dynamically search across multiple models and their related data, offering developers the ability to handle various levels of relationships in a single, streamlined query.

Class Overview

Namespace: ChandraHemant\DynamicSearch
Namespace: ChandraHemant\CommonUtils
Namespace: ChandraHemant\FirebaseNotification
Author: Hemant Kumar Chandra

Features

Usage Example

Here's an example API request to demonstrate how the function works:

In this example, the function will:

Installation

You can easily add this functionality to your Laravel project by installing the package via Composer:

DynamicSearchHelper & CommonUtils Class

The DynamicSearchHelper & CommonUtils class provides a set of methods for retrieving and manipulating data from a database table, especially tailored for use with Laravel's Eloquent ORM. This guide outlines how to effectively utilize these methods to implement dynamic search functionality.

Core Methods

getCustomModelData

Retrieves data from an Eloquent model with dynamic conditions and relationships.

Parameters:

Example usage:

uploadFiles

Handles file uploads with various configuration options.

Parameters:

Example usage:

*** Note: Define the Disk in config/filesystems.php. It points to the public/uploads directory and is configured as a public disk. Make sure Disk name should be same as pointing directory name:

alphaNumericGenerator

Generates alphanumeric sequences with customizable format.

Parameters:

Example usage:

dataSubmitRecursion

Recursively attempts to save model data with safety checks.

Example usage:

dataDeleteRecursion

Recursively attempts to delete model data with safety checks.

Example usage:

sendMail

Sends emails with advanced configuration options.

Parameters:

Example usage:

sendPushNotificationWithServerKey

Handles send notification using firebase.

Parameters:

Example usage:

sendPushNotification

Handles sending notifications using Firebase Cloud Messaging (FCM).

Parameters:

Example usage:

Expected Output:

On success:

On failure:

Usage

Retrieving Data

You can retrieve data from your database table using the getDynamicSearchData method.

Search Functionality

You can enable search functionality by providing columns and relationships to search in.

Pagination

Pagination is applied automatically based on the request parameters.

Constructor Parameters

Methods

getDynamicSearchData(): Illuminate\Support\Collection Retrieve dynamic search data from the provided Eloquent model.

Example

Here's an example of how you can utilize these methods in your controller:

Conclusion

This guide provides a comprehensive overview of how to use the DynamicSearchHelper class in your Laravel application. By following these instructions, you can easily implement dynamic search functionality and utilize various helper methods for common tasks.

How to Use

  1. Installation: Ensure that the DataTableHelper class is included in your Laravel project.
  2. Initialization: Create an instance of the DataTableHelper class.
  3. Data Retrieval: Call the getDynamicSearchData method with specified columns, relationship columns, and other parameters to retrieve custom paginated and filtered data.
  4. Customization: Adjust the class according to your specific use case by modifying the methods or extending its functionality.

Note:

Maintaining consistency between the searchColumns array and the actual columns in your model and its relationships is crucial for accurate search results in the DynamicSearchHelper class.

The searchColumns array specifies the fields and relationships to be searched within your models. Each element should correspond directly to the columns and relationships defined in your Eloquent models. For instance, if you specify ['orders.product.category.name'] in the searchColumns, it assumes that your model has the appropriate relationships (orders, product, category) set up correctly and that each relationship has the name field available for searching.

To ensure that the dynamic search functionality works seamlessly, double-check that:

Inconsistent or incorrect searchColumns values may lead to unexpected results or errors, as the helper class will attempt to search across columns and relationships that may not exist or be properly defined.


All versions of htkc-utils with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3
google/auth Version ^1.45
guzzlehttp/guzzle Version ^7.9
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 chandra-hemant/htkc-utils contains the following files

Loading the files please wait ....