Download the PHP package supaapps/supaapps-laravel-api-kit without Composer

On this page you can find all versions of the php package supaapps/supaapps-laravel-api-kit. 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 supaapps-laravel-api-kit

Supaapps Laravel API Kit

Boilerplate and helpers for Supaapps Laravel projects

Table of content

Installation

Usage

Generate CRUD controller

To create crud controller, run the following command:

CRUD

To get advantage of CRUD boilerplate controller, extend BaseCrudController in your controller. Example:

Available CRUD properties

There are multiple properties you can use within your CRUD controller:

Properties used by CrudIndexTrait



All of the upcoming properties should be array. If you want to add some logic head to CRUD controller override

In following example, it lockups for %supa% in either name or description


In following example, it lockups for 1 in id, price or category_id


In following example, it lockups for 2023-09-26 in completed_at, created_at or updated_at


In the following example, it will apply the query WHERE id IN (1, 2) AND code IN ('ABC')


In the following example, it will search the records that have created_at larger than create_at_min and less than created_at_max and updated_at larger than updated_at_min


In the following example, user wants to get the completed and not cancelled rewards. These rewards have completed_at IS NOT NULL and cancelled_at IS NULL


In the following example, there are 2 order by rules are defined in the controller. The results will be ordered by created_at descending and by id ascending.

But if the request has sort query parameter, then it will override the defaultOrderByColumns. Example:

This will sort the results first by id descending then by name ascending

Properties used by UpdateIndexTrait

Properties used by DeleteIndexTrait


CRUD Controller Override

If you want to add more logic to properties, you can override properties in your controller using getters. For example: you want to return different $searchExactFields depending on a condition:

Override methods in CrudIndexTrait


User signature

You can keep track of created and updated user of your model in 3 steps:

  1. Include required columns to your model schema

Where auditIds accepts 2 parameters

  1. Include custom columns to your model $fillable property

  2. Add observer to your model

Tests

Linting

Useful links


All versions of supaapps-laravel-api-kit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1 || ^8.3
illuminate/support Version ^10.0 || ^11.0
illuminate/http Version ^10.0 || ^11.0
illuminate/database Version ^10.0 || ^11.0
illuminate/console Version ^10.0 || ^11.0
jfcherng/php-diff Version ^6.15
symfony/var-exporter Version ^6.3
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 supaapps/supaapps-laravel-api-kit contains the following files

Loading the files please wait ....