Download the PHP package yaddabristol/crud without Composer

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

CRUD

Extendable CRUD controller for quick development.

Requirements

Installation

Usage

CRUD is designed to let you use the full power of Laravel without having to write tedious controllers and form and list views. The basic steps for creating a new section are as follows:

  1. Create a database table

  2. Create a Model

  3. Create a Controller

  4. Update your controller so that it extends the CRUD controller. E.g.

Controller Configuration

You'll want to override some of these things in your controller. See the source code of Controllers\CrudController for more info.

protected $model = Thing::class;
protected $views_dir = 'thing_views';
protected $name_singular = 'Thing';
protected $name_plural = 'Things';
protected $route = 'admin';
protected $rules = [];
protected $messages = [];
protected $paginate = false;
protected $settings = [
  'perpage' => 20,
  'orderby' => 'id',
  'order' => 'ASC'
];
protected $searchables = ['id'];
protected $group_by = 'id';
protected $has_files = false;
protected $form_fields = [];
protected $table_columns = ['id'];

Form Generation

To automatically generate a form add something like the following to your form.blade.php

@include('crud::partials.autoform', [
  'fields' => $form_fields,
  'model'  => $item
])

Then populate the form_fields attribute of your controller with an array of fields. E.g.

protected $form_fields = [
    'your_field_name' => [
        'type' => 'text',
        'label' => 'A Text Field',
        'placeholder' => 'Put some text here',
        'help_text' => 'This is a field for entering text',
        'required' => true
    ]
];

Available Options

Images

The image field type assumes the use of Laravel Stapler for attaching images to models. If you don't want to use that, you can easily override the image field type or create your own. Just copy crud/src/Views/fields/image.blade.php to {YOUR_APP}/resources/views/fields/image.blade.php.

Usage Notes

Default Values

To add default values in a create form, set protected $attributes = []; on your model.

Gotchas

Models

Remember to set up the fillable attribute on your Model, otherwise it will fail with a mass assignment exception on _token.

File uploads

If you add a file/image field to a form, you'll need to set protected $has_files = true; on your controller.

Development

Need to add line to base-install under autoload - PSR4 when developing from the packages folder: "Yaddabristol\\Crud\\": "packages/yadda/crud/src/".

You'll need to require the laravelcollective/html package from your base install as you'll be developing in the packages folder and it won't automatically register it's requirements

Documentation

To generate the docs use apigen:

apigen generate -s src -d docs

Todo


All versions of crud with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
laravel/framework Version 5.*
laravelcollective/html Version ^5.2
phpunit/phpunit Version ^4.8
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 yaddabristol/crud contains the following files

Loading the files please wait ....