Welcome to admininja
I use admininja
as my sideproject to learn more about Laravel 5 and package development. You are always welcome to contribute to my journey. Feel free to point out mistakes or ask questions.
Work in progress
This is my current task list:
- Add basic config and publish command for assets
- Create simple GUI
- CRUD for basic Eloquent model
- Manage relationships
Installation
This package is under construction and not available through Packagist yet. You can download the source follow the steps below:
- Unzip the package in your vendor directory manually in the folder
mrkj/admininja
. - Add the following line to the PSR-4 autoloading section in the
composer.json
file of your project:"Mrkj\\Admininja\\": "vendor/mrkj/admininja/src/"
. - Add the service provider to
config/app.php
:'Mrkj\Admininja\AdmininjaServiceProvider'
. - Run
php artisan vendor:publish
to publish the config. - Run
php artisan admininja:publish
to publish the assets to your public directory.
admininja
Update your model to support To use admininja
with your Eloquent
model you can use this snippet:
<?php namespace App;
use Illuminate\Database\Eloquent\Model;
use Mrkj\Admininja\Traits\Admininjable as Admininjable;
class Post extends Model {
use Admininjable;
/**
* Holds the admininja config for this Eloquent model
* @var array
*/
protected $admininjaConfig = [
'title' => 'Posts',
'columns' => [
'id',
'title',
],
'edit_fields' => [
'title' => [
'type' => 'text',
],
'content' => [
'type' => 'text',
],
]
];
protected $fillable = array('title', 'content');
}
admininja
become?
What will - Easy to integrate
- Provide an easy CRUD interface for your existing models and relations
- Looks based on Twitter Bootstrap
- Tests with PHPUnit
- Much more!
License
This package is available under the MIT license.