mlantz/gondolyn3

This package is abandoned and no longer maintained. The author suggests using the gondolyn3 package instead.

Gondolyn v3

1.4 2016-01-04 08:36 UTC

This package is auto-updated.

Last update: 2019-02-20 18:40:57 UTC


README

Gondolyn - A Powerful set of tools for Laravel based apps

CodeShip StatusScrutinizer Code Quality

The set of tools and methods provided by Gondolyn are required to use Gondolyn Modules - which include Accounts and Groups to enable faster app development.

For further information on Accounts and Groups please take a look at their respective repositories. If you want a simple starting app shell take a look at GondolynShell. It comes preset with middleware definitions, test config set, and the appropriate module composer configurations.

Author(s):

Official Documentation for Gondolyn

Documentation for the entire package collection can be found on the Gondolyn website.

Requirements

  1. PHP 5.5.9+
  2. OpenSSL

Composer install

composer require "mlantz/gondolyn3"

Add to Services

Mlantz\Gondolyn\GondolynProvider::class

Add to ModelFactory.php

$factory = Module::factoryCollection($factory);

Auth

Please edit the following line in your `auth.php` config if you want to use the Gondolyn Accounts and other plugins.

    'model' => App\Modules\Accounts\Models\Accounts::class

API components

Modules compatible with Gondolyn3 require the following headers with the appropriate values set. In order to ensure that the API components will work with the modules you need to add the following lines to the .htaccess file

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
Gondolyn: __KEY__
Authorization: Bearer __TOKEN__

Safe Domains

Please add this to the `.env` file in order to ensure the subscriptions and other components are able to run correctly. See the SecurtyGuard Middleware for more information.

SAFE_DOMAINS=https://apis.google.com|https://www.google.com|http://fonts.googleapis.com|http://fonts.gstatic.com|https://js.stripe.com/v2/|https://maxcdn.bootstrapcdn.com

Databse

Add the following to your `.env` file:

DB_CONNECTION=gondolyn

Then add the following to your databse connections config

'gondolyn' => [
    'driver'   => 'sqlite',
    'database' => database_path('gondolyn/gondolyn.sqlite'),
    'prefix'   => '',
],

Mail Driver

MAIL_DRIVER=sendmail

Publish

php artisan vendor:publish --provider="Mlantz\Gondolyn\GondolynProvider"

Middleware

Make sure you add the middleware to help with building your apps and ensuring module functionality.

  • Required
protected $middleware = [
    \Mlantz\Gondolyn\Middleware\Before::class,
    \Mlantz\Gondolyn\Middleware\TwoFactorAuthentication::class,
    \Mlantz\Gondolyn\Middleware\VerifyCsrfToken::class,
];

protected $routeMiddleware = [
    'before' => \Mlantz\Gondolyn\Middleware\Before::class,
    'cors' => \Mlantz\Gondolyn\Middleware\Cors::class,
    'security.guard' => \Mlantz\Gondolyn\Middleware\SecurityGuard::class,
    'permissions' => \Mlantz\Gondolyn\Middleware\PermissionsMatrix::class,
];
  • Optional
protected $middleware = [
    \Mlantz\Gondolyn\Middleware\Cors::class,
    \Mlantz\Gondolyn\Middleware\SecurityGuard::class,
    \Mlantz\Gondolyn\Middleware\PermissionsMatrix::class,
    \Mlantz\Gondolyn\Middleware\TwoFactorAuthentication::class,
];

Commands

php artisan gondolyn:module
php artisan gondolyn:module-migrate
php artisan gondolyn:dbuild
php artisan gondolyn:key
php artisan gondolyn:crud

Unit Testing

Please ensure that in your laravel or gondolynShell you need to add these lines to your TestCase.

use Mlantz\Gondolyn\Traits\GondolynTestTrait;

Add this line to the `createApplication()method before thereturn`

$this->setUpGondolyn();
  • Also add this to your Phpunit.xml file
<testsuite name="Modules Test Suite">
    <directory>./app/Modules/</directory>
</testsuite>

License

Gondolyn3 is open-sourced software licensed under the MIT license

Bug Reporting and Feature Requests

Please add as many details as possible regarding submission of issues and feature requests

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.