nukacode/lumen-base

The Laravel Lumen Framework with nukacode.
411 3
Install
composer require nukacode/lumen-base
Latest Version:1.0.1
License:MIT
Last Updated:May 12, 2015
Links: GitHub  ·  Packagist
Maintainer: stygiansabyss

General Lumen changes

  • Facades, Eloquent and DotEnv are enabled. Comment the lines in bootstrap/app.php out if you don't need them.
  • Configs folder added. If you want to add a config file, look to Lumen Docs.
  • app/Http/routes.php contains a /status route that will return a 200 response with JSON "ok".

Models

  • All models return collections as an instance of App\Support\Collection.
  • All models can now tap ->hashId to get a hashed version of it's id.
  • All models now have findHash(). This works the same as find() but expects the hashed id.
  • All models are expected to set a HASH_ID constant. This will be the models salt.
    • This is checked in the BaseModel constructor and will throw an exception if it's not found.

Transformers


    <?php namespace App\Transformers;
    
    use App\Models\Video;
    
    class VideoTransformer extends BaseTransformer {

	public function transform(Video $video)
	{
		return [
			'id' => $video->hashId
		];
	}

    }

Related Packages

laravel/lumen-framework

The Laravel Lumen Framework.

27,738,934 1,509
spira/core

Spira app core

4,797 2
sarahman/laravel-activitylog-with-pivots

Activity Log package deals with all kinds of Eloquent events based logging as we...

708 1
ognestraz/laravel-image

The Image Module for Laravel Framework.

251 1
ognestraz/laravel-model

The Models for Laravel Framework.

244 0

Version History

Version Released License
1.0.1 MIT
1.0.0 MIT