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.
This is my current task list:
- Add basic config and publish command for assets
- Create simple GUI
- CRUD for basic Eloquent model
- Manage relationships
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.jsonfile of your project:"Mrkj\\Admininja\\": "vendor/mrkj/admininja/src/". - Add the service provider to
config/app.php:'Mrkj\Admininja\AdmininjaServiceProvider'. - Run
php artisan vendor:publishto publish the config. - Run
php artisan admininja:publishto publish the assets to your public directory.
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');
}- Easy to integrate
- Provide an easy CRUD interface for your existing models and relations
- Looks based on Twitter Bootstrap
- Tests with PHPUnit
- Much more!
This package is available under the MIT license.
