All Projects → greabock → maker

greabock / maker

Licence: other
Laravel 5.4 maker

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to maker

laravel-vue-component
A Blade directive to ease up Vue workflow for Laravel projects
Stars: ✭ 19 (+5.56%)
Mutual labels:  laravel-5-package
content-management-system
Content management system for laravel developers'. It's easy to install and run.
Stars: ✭ 16 (-11.11%)
Mutual labels:  laravel-5-package
mail-template
💌 This package is a easy to use mail template collection for Laravel 5.x.
Stars: ✭ 18 (+0%)
Mutual labels:  laravel-5-package
laravel-decorator
Easily decorate your method calls with laravel-decorator package
Stars: ✭ 125 (+594.44%)
Mutual labels:  laravel-5-package
laravel-geometry
SPINEN's Laravel wrapper over geoPHP
Stars: ✭ 36 (+100%)
Mutual labels:  laravel-5-package
laravel-assetcachebuster
Laravel 5 package that prefixes asset urls with a unique hash which will allow invalidation of asset files cached by the browser.
Stars: ✭ 33 (+83.33%)
Mutual labels:  laravel-5-package
laravel-sms
Laravel 贴合实际需求同时满足多种通道的短信发送组件
Stars: ✭ 67 (+272.22%)
Mutual labels:  laravel-5-package
laravel-revaluation
Laravel 5 model revaluation helper.
Stars: ✭ 31 (+72.22%)
Mutual labels:  laravel-5-package
laravel-email-exceptions
Email Exceptions package for Laravel 5.x
Stars: ✭ 33 (+83.33%)
Mutual labels:  laravel-5-package
correios-consulta
Buscar informações de serviços dos correios diretamente nos sites deles, sem utilizar api de terceiros.
Stars: ✭ 155 (+761.11%)
Mutual labels:  laravel-5-package
magic-box
A magical implementation of Laravel's Eloquent models as injectable, masked resource repositories.
Stars: ✭ 46 (+155.56%)
Mutual labels:  laravel-5-package
laravel-site-protection
Protect your site with a simple password form
Stars: ✭ 38 (+111.11%)
Mutual labels:  laravel-5-package
laravel-storyblok
Make Laravel and Storyblok work together beautifully.
Stars: ✭ 45 (+150%)
Mutual labels:  laravel-5-package
baserepo
Base repository
Stars: ✭ 71 (+294.44%)
Mutual labels:  laravel-5-package
laravel-zxcvbn
Implementation of the zxcvbn project by @dropbox for Laravel.
Stars: ✭ 24 (+33.33%)
Mutual labels:  laravel-5-package
sweetalert
Laravel 5 Package for SweetAlert2. Use this package to easily show sweetalert2 prompts in your laravel app.
Stars: ✭ 28 (+55.56%)
Mutual labels:  laravel-5-package
collage
Generate Image Collage with PHP and Laravel
Stars: ✭ 70 (+288.89%)
Mutual labels:  laravel-5-package
laravel5-api
A modular controller for exposing Laravel 5 Eloquent models as a REST API
Stars: ✭ 13 (-27.78%)
Mutual labels:  laravel-5-package
laravel-firebase
Laravel FCM (Firebase Cloud Messaging) Notification Channel
Stars: ✭ 25 (+38.89%)
Mutual labels:  laravel-5-package
laravel-browsershot
Browsershot wrapper for Laravel 5
Stars: ✭ 108 (+500%)
Mutual labels:  laravel-5-package

Build Status

Intention (DEPRECATED)

Deprecated scince v5.4.16. Use method makeWith() instead
Laravel 5.4 had severely crippled DI container.

The container's make method no longer accepts a second array of parameters. This feature typically indicates a code smell. Typically, you can always construct the object in another way that is more intuitive.

This library intends to bring back its former glory.

#Installation composer require greabock/maker
After updating composer, add the Greabock\Maker\MakerServiceProvider::class to the providers array in config/app.php

#Usage

app(Maker::class)->make(Some::class, ['foo' => 'some', 'bar' => 'other'])
// or
make(Some::class, ['foo' => 'some', 'bar' => 'other']);

You can also bind closure:

use Illuminate\Contracts\Container\Container;
use Greabock\Maker\Maker;

app(Maker::class)->bind(Some::class, function(Container $container, $parameters){
   $some = $container->make(Some::class);
   $some->doSomeThing($parameters);
   return $some;
});

#Warning!

This function is similiar but isn't fully compatible with old App::make(). Contextual binding does not work when you build objects with Maker.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].