2017 © Pedro Peláez
 

library laravel-crud

image

sergiovilar/laravel-crud

  • Friday, December 11, 2015
  • by sergiovilar
  • Repository
  • 1 Watchers
  • 3 Stars
  • 215 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

laravel-crud

Create CRUDs (Create, Read, Update, Delete) for your models in Laravel 5 and Lumen., (*1)

Installation

Install via composer:, (*2)

composer require sergiovilar/laravel-crud

Copy the contents of the views folder to resources/views., (*3)

Laravel 5

Add this line to the bootstrap/app.php file before the return $app;:, (*4)

new AdminBootstrap('/app/Admin');

/app/Admin should be the folder where you'll put the CRUDs specification., (*5)

Add this line to your app/http/routes.php file:, (*6)

Admin::routes();

Lumen

Add this line to the bootstrap/app.php file before the line containing $app->group(['namespace' => 'App\Http\Controllers']):, (*7)

new AdminBootstrap('/app/Admin', $app);

/app/Admin should be the folder where you'll put the CRUDs specification., (*8)

Add this line to your app/http/routes.php file:, (*9)

Admin::routes($app);

Usage

Create a file with the name of the model you want to create the CRUD:, (*10)

touch app/Admin/Car.php

Car.php:, (*11)

Admin::model('Car')
->middleware('admin') // Specify an HTTP Middleware to check if the user is logged
->title('Cars') // Title of the page
->columns(function(){ // Columns to list the items in this model
    Column::string('model', 'Model'); // field, label
    Column::integer('year', 'Year');
})->form(function(){
    FormItem::text('model', 'Model'); // field, label
    FormItem::number('year', 'Year');
});

The Versions

11/12 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Sergio Vilar

11/12 2015

v0.2.2

0.2.2.0

  Sources   Download

MIT

The Requires

 

by Sergio Vilar

23/11 2015

v0.2.1

0.2.1.0

  Sources   Download

MIT

The Requires

 

by Sergio Vilar

01/11 2015

V0.2.0

0.2.0.0

  Sources   Download

MIT

The Requires

 

by Sergio Vilar

31/10 2015

v0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

 

by Sergio Vilar