LaravelPackages.net
Acme Inc.
Toggle sidebar
wcr/entitize

A crud package for Laravel, with bootstrap and former

20
0
0.2.3
About wcr/entitize

wcr/entitize is a Laravel package for a crud package for laravel, with bootstrap and former. It currently has 0 GitHub stars and 20 downloads on Packagist (latest version 0.2.3). Install it with composer require wcr/entitize. Discover more Laravel packages by wcr or browse all Laravel packages to compare alternatives.

Last updated

Entitize

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Via Composer

$ composer require wcr/entitize

Usage

1. Publish components

$ php artisan vendor:publish --tag:entitize

2. Create Model whith Migration

$ php artisan make:model Book -m

edit migration /database/migrations/0000_00_00_000000_create_books_table.php

<?php
/** more code **/
    public function up()
    {
        Schema::create('books', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->string('autor');
            $table->date('published_at')->nullable();
            $table->boolean('deleted')->default(0); // This field is REQUIRED
            $table->timestamps();
        });
    }
/** more code **/
?>

Launch migration

$ php artisan migrate

3. Create controller

$ php artisan make:controller BookController

4. use entitize in controlle

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Wcr\Entitize\Controllers\Entitize;

use App\Book;

class BookController extends Controller
{
    use Entitize;

    public $tableParams = ['Id'=>'id', 'Title'=>'title', 'Author'=>'author', 'Created at'=>'created_at'];

    public $fields = array(
        [
            'name' => 'title',
            'label' => 'Title',
            'validation' => 'required'
        ],
        [
            'name' => 'author',
            'label' => 'Author',
            'validation' => 'required'
        ],
        [
            'name' => 'published_at',
            'label' => 'Published at',
            'type' => 'date'
        ],
    );
}

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

Comments