lupka / crudder by lupka

Dead simple admin panels for Laravel.
13
2
2
Package Data
Maintainer Username: lupka
Maintainer Contact: alex@alexchalupka.com (Alex Chalupka)
Package Create Date: 2017-01-16
Package Last Update: 2017-01-17
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-04-15 03:00:12
Package Statistics
Total Downloads: 13
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

This is still under development, DO NOT USE IN PRODUCTION

Crudder

[icense](LICENSE)

Installation

1: Install via Composer

composer require lupka/crudder

2: Add Service Provider

Add the new provider to the providers array of config/app.php:

'providers' => [
    // ...
    Lupka\Crudder\CrudderServiceProvider::class,
    // ...
],

3: Add Facade

Add the new Crudder alias to the aliases array of config/app.php:

'aliases' => [
    // ...
    'Crudder' => Lupka\Crudder\CrudderFacade::class,
    // ...
],

4: Add routes

Add a call to Crudder::routes() wherever you want within your routes file. The example below uses a route group with a prefix and auth middleware:

Route::group(['prefix' => 'crudder', 'middleware' => 'auth'], function(){
    Crudder::routes();
});

5: Publish config file

Publish the Crudder config file by running the following command:

php artisan vendor:publish --tag=config

Configuration

Basic Setup

All you need to do to get started is enter the class name of the Eloquent Model you want to have an admin for in the crudder.php config file.

    'models' => [
        'App\BlogPost' => []    
    ]

Crudder will use a basic form based on the field types in your database.

Tips

If you want to modify values programmatically before/after saving, I recommend using observers: https://laravel.com/docs/5.3/eloquent#observers