stwt/mothership

There is no license information available for the latest version (1.0.1) of this package.

A Laravel based CRUD app framework.

This package's canonical repository appears to be gone and the package has been frozen as a result.

1.0.1 2014-01-09 13:34 UTC

This package is not auto-updated.

Last update: 2022-12-24 05:01:02 UTC


README

A Laravel based admin app framework.

Features

  • Quickly setup a CRUD admin app
  • Automatically generates forms suited to your models
  • Twitter Bootstrap stylesheets

Requirements

  • Laravel 4
  • PHP 5.4.*

Installation

Add the following to your root composer.json

"stwt/mothership": "*"

Update your packages with composer update or install with composer install.

Update app.php

Once Composer has installed or updated your packages you need to register the Mothership with Laravel. Open up app/config/app.php and add the following to the providers key.

'Stwt\Mothership\MothershipServiceProvider',

Next you need to alias Mothership's facade. Find the aliases key which should be below the providers key.

'Mothership'      => 'Stwt\Mothership\Mothership',

Assets

Mothership comes with package assets (css & js files). Publish these to your public directory.

php artisan asset:publish stwt/mothership

Config

Mothership also comes with a config file. Publish this to your app/config directory.

php artisan config:publish stwt/mothership

Finally, run composer dump-autoload to updated your autoload class map

Creating your first Mothership

Models

Any models to be used in the mothship should extend the MothershipModel class.

use Stwt\Mothership\MothershipModel as MothershipModel;

class Thing extends MothershipModel {
    //...
}

Controllers

Resource controllers should extends the MothershipResourceController class.

use Stwt\Mothership\MothershipResourceController as MothershipResourceController;

class ThingController extends MothershipResourceController {
    //...
}

Routes

Add the new resource controller to your app/routes.php file.

Route::resource('admin/things', 'ThingController');

Done.