Download the PHP package atayahmet/laravel-castable without Composer

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

Build Status Total Downloads License Latest Stable Version

Laravel Castable

Laravel Castable package is a type converter, input filter or sanitizer. It is possible to do all of these operations. Supported POST, RAW DATA, GET requests methods. We started by inspiring the Laravel Eloquent data cast.

Requirements

PHP 5.6, 7.0+ Laravel 5.3 (LTS) or Laravel 5.4 (Current)

Get Started

Firstly, we install package:

and then we need add the service provider to the app.php

OK, we done.

Let's see how to use the laravel-castable.

Castable types

Types
string
integer
boolean
float
double
real
unset
array
object (stdClass)
collection

Create Castable Form Request class

We created new artisan command that inspired make:request from laravel built in command.

New form of the form request class:

We added four inputs to casts property, status attibute added to query string parameters and age, student and interests attributes added to post parameters.

Raw and converted type of the attributes

Post:

Name Value Type Cast Type
name Ali string string
age 19 string integer
student true string boolean
interests books, computers array collection

Query String:

Name Value Type Cast Type
save true string boolean

To get the above result for:

Get a input:

`

if request is post raw data:

`

Get original inputs:

Get original an input:

Original raw data:

Add presenter to the inputs

You can add presenter to the all post, query and json inputs. This feature gives you a chance to filter inputs.

Add presenter for post parameters:

`

Add presenter for query string parameters:

`

Add presenter for json raw data parameters:

`

License

This package is open-source software licensed under the MIT license.


All versions of laravel-castable with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.5
illuminate/support Version 5.3.*|5.4.*
symfony/http-foundation Version 3.1.*|3.2.*
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 atayahmet/laravel-castable contains the following files

Loading the files please wait ....