2017 © Pedro Peláez
 

laravel-package crud

Small framework for creating CRUD pages programmatically.

image

rasrobin/crud

Small framework for creating CRUD pages programmatically.

  • Monday, June 18, 2018
  • by rasrobin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Small extendable CRUD coding framework

Version 0.2, (*1)

The goal of this package is to provide a small extendable framework to create overview and CRUD (Create, Read, Update, Delete) pages for your entities programmatically. When familiar with it, you should be able to create a simple new entity with CRUD functionality under the hour., (*2)

The html contains classes to make it instantly look okay with default Bootstrap., (*3)

1 Dependencies

  • Laravel 5.6.x
  • Laravel Collective html 5.4
  • jQuery 3.x

2 Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require rasrobin/crud., (*4)

composer require "rasrobin/crud": "^0.2.0"

Run the following command to make the included javascript assets available., (*5)

php artisan vendor:publish --tag=public --force

Creating a new entity with CRUD.

  • Create your migration file and create a table with it.
  • Create a Model for your entity and have it implement HasCrud.
  • Create a controller and have it extend CrudController.
  • In the controller, set the public $model tot the Model you created.
/**
 * Class BlogController
 */
class BlogController extends CrudController
{
    /**
     * @var HasCrud $model
     */
    public $model = Blog::class;
}
  • Create a view with the required form fields and have crudFormTemplate() in your Model return it's path/name.
/**
 * {@inheritdoc}
 */
public static function crudFormTemplate()
{
    return 'rasrobin\blog::blog_form';
}
  • Create a route for your controller. An example:
Route::group(['prefix' => 'admin', 'middleware' => ['web', 'auth']], function(){
    Route::resource('blog', 'Rasrobin\Blog\Controllers\BlogController');
});

Default columns.

Adding columns.

Adding special columns.

One-to-many entity relationship.

The Versions

18/06 2018

dev-master

9999999-dev

Small framework for creating CRUD pages programmatically.

  Sources   Download

MIT

The Requires

 

by Robin Spoelstra

17/06 2018

v0.2.3

0.2.3.0

Small framework for creating CRUD pages programmatically.

  Sources   Download

MIT

The Requires

 

by Robin Spoelstra

15/06 2018

v0.2.2

0.2.2.0

Small framework for creating CRUD pages programmatically.

  Sources   Download

MIT

The Requires

 

by Robin Spoelstra

15/06 2018

v0.1.0

0.1.0.0

Small framework for creating CRUD pages programmatically.

  Sources   Download

MIT

The Requires

 

by Robin Spoelstra

15/06 2018

v0.2.1

0.2.1.0

Small framework for creating CRUD pages programmatically.

  Sources   Download

MIT

The Requires

 

by Robin Spoelstra

15/06 2018

v0.2.0

0.2.0.0

Small framework for creating CRUD pages programmatically.

  Sources   Download

MIT

The Requires

 

by Robin Spoelstra