Download the PHP package rexlabs/laravel-smokescreen without Composer

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

Laravel Smokescreen

License: MIT Build Status Code Coverage Packagist

Overview

Laravel Smokescreen is a package for transforming your Laravel models, and other entities.

This package tightly integrates the rexlabs/smokescreen (Vanilla PHP) package with the Laravel framework, to provide the convenience and minimal boilerplate when working with Laravel applications.

Usage

Requirements

Installation

This package is currently hosted on RexSoftware's private packagist repository. First ensure you have configured your composer.json to use this repository.

Install package

composer require rexlabs/laravel-smokescreen

This package will be auto-discovered, and no additional configuration is necessary.

Configuration

To publish the configuration file to your app/config folder, run the following command:

This will create config/smokescreen.php:

API

transform(): Set resource to be transformed

$smokescreen->transform(mixed $resource, mixed $transformer = null);

item(): Set single item resource to be transformed

$smokescreen->item(mixed $item, mixed $transformer = null);

collection(): Set collection resource to be transformed

$smokescreen->collection(mixed $collection, mixed $transformer = null);

transformWith(): Set the transformer to use on the previously set resource

$smokescreen->transformWith(TransformerInterface|callable $transformer);

serializeWith(): Override the serializer to be used

loadRelationsVia(): Override the default Laravel relations loader

$smokescreen->loadRelationsVia(RelationsLoaderInterface $loader);

resolveTransformerVia(): Override the default transformer resolver

$smokescreen->loadTransformersVia(TransformerResolverInterface $loader);

response(): Access the generated response object

$response = $smokescreen->response(int $statusCode = 200, array $headers = [], int $options = 0);

freshResponse(): Generate a fresh Response object

$response = $smokescreen->freshResponse(int $statusCode = 200, array $headers = [], int $options = 0);

withResponse(): Apply changes to the generated response object

$smokescreen->withResponse(callable $apply);

clearResponse(): Clear any cached response

$smokescreen->clearResponse();

Transformers

Example Transformer

Contributing

Pull-requests are welcome. Please ensure code is PSR compliant. Github Repository

About


All versions of laravel-smokescreen with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4 <8.4
rexlabs/smokescreen Version ^2.3
laravel/framework Version ^8.0|^9.0|^10.0|^11.0
doctrine/dbal Version ^2.5|^2.7|^3.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 rexlabs/laravel-smokescreen contains the following files

Loading the files please wait ....