All Projects → limewell → laravel-make-extender

limewell / laravel-make-extender

Licence: MIT license
Generate and autoload custom Helpers, Builder Scope, Service class, Trait, Custom Casts, Collections Macros, View Composers

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-make-extender

Gwasrapidd
gwasrapidd: an R package to query, download and wrangle GWAS Catalog data
Stars: ✭ 28 (-6.67%)
Mutual labels:  trait
Kubevela
The Modern Application Platform.
Stars: ✭ 2,984 (+9846.67%)
Mutual labels:  trait
go-traits
A concept package that helps implement mixin behavior using embedded structs and hook interfaces.
Stars: ✭ 21 (-30%)
Mutual labels:  trait
Plant
Trait-Driven Models of Ecology and Evolution 🌲
Stars: ✭ 39 (+30%)
Mutual labels:  trait
Laravel Ownership
Laravel Ownership simplify management of Eloquent model's owner.
Stars: ✭ 71 (+136.67%)
Mutual labels:  trait
Has Parameters
A trait that allows you to pass arguments to Laravel middleware in a more PHP'ish way.
Stars: ✭ 149 (+396.67%)
Mutual labels:  trait
Laravel Stager
Laravel Stager State Machine, Its purpose is to add state machine functionality to models
Stars: ✭ 16 (-46.67%)
Mutual labels:  trait
witchcraft
Opionated PHP magic methods as traits for PHP 5.4+
Stars: ✭ 23 (-23.33%)
Mutual labels:  trait
Laravel Likeable
Rate Eloquent models with Likes and Dislikes in Laravel. Development moved to Laravel Love package!
Stars: ✭ 95 (+216.67%)
Mutual labels:  trait
Laravel Userstamps
Laravel Userstamps provides an Eloquent trait which automatically maintains `created_by` and `updated_by` columns on your model, populated by the currently authenticated user in your application.
Stars: ✭ 193 (+543.33%)
Mutual labels:  trait
Codeigniter Psr4 Autoload
CodeIgniter 3 PSR-4 Autoloader for Application
Stars: ✭ 40 (+33.33%)
Mutual labels:  trait
Utils
🛠 Lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.
Stars: ✭ 1,158 (+3760%)
Mutual labels:  trait
Schedule
Schedule is a package that helps tracking schedules for your models. If you have workers in a company, you can set schedules for them and see their availability though the time.
Stars: ✭ 155 (+416.67%)
Mutual labels:  trait
Laravel Guided Image
Simplified and ready image manipulation for Laravel through intervention image.
Stars: ✭ 32 (+6.67%)
Mutual labels:  trait
yii2-render-many
Trait for Yii Framework 2
Stars: ✭ 14 (-53.33%)
Mutual labels:  trait
Eloquent Sortable
Sortable behaviour for Eloquent models
Stars: ✭ 914 (+2946.67%)
Mutual labels:  trait
Traits Decorator
Traits with decorators
Stars: ✭ 133 (+343.33%)
Mutual labels:  trait
laravel-cachable-attributes
Allows to cache attribute accessor values in an easy way.
Stars: ✭ 24 (-20%)
Mutual labels:  trait
behavior-trait
Allows handling events via inline declared methods, which can be added by traits
Stars: ✭ 18 (-40%)
Mutual labels:  trait
Laravel Favorite
Allows Laravel Eloquent models to implement a 'favorite', 'like', 'remember' and 'follow' features.
Stars: ✭ 194 (+546.67%)
Mutual labels:  trait

laravel-make-extender

Generate below stub

  1. Generate and autoload custom helpers, It can generate multilevel helpers in the context of the directory.
  2. Generate Service class for process chunk of codes
  3. Generate Trait for process chunk of codes
  4. Generate Global Scope class for Model
  5. Generate Custom Casts
  6. Generate Collections Macros
  7. Generate View Composers

Latest Version on Packagist Total Downloads

This package helps to generate and autoload custom helpers, It can generate multilevel helpers in the context of the directory.

Installation

You can install the package via composer:

composer require limewell/laravel-make-extender

Generate Helper file

Generate UserHelper.php under App/Helpers directory

php artisan make:helper UserHelper

Generate Module/UserHelper.php under App/Helpers/Module directory

php artisan make:helper Module/UserHelper

Generate Service

Generate UserService.php under App/Services directory

php artisan make:service UserService
(new UserService())->handle();

Generate invokable UserService.php under App/Services directory

php artisan make:service UserService --invokable
(new UserService())();

Generate Trait

Generate UserTrait.php under App/Traits directory

php artisan make:trait UserTrait

Generate bootable UserTrait.php under App/Traits directory

php artisan make:trait UserTrait --bootable

Generate Scope

Generate UserScope.php under App/Scopes directory

php artisan make:scope UserScope

see document here for how to use global scopes

Generate Custom Casts

Generate JsonCast.php under App/Casts directory

php artisan make:cast JsonCast

see document here for how to use Custom Casts

Generate Collections Macro

Generate toUpper.php under App/Macros directory

php artisan make:macro toUpper

see document here for how to use Macro

Generate View composers

Generate config file for register view composers

php artisan vendor:publish --provider="Limewell\LaravelMakeExtender\LaravelMakeExtenderServiceProvider" --tag="config"

Generate view composers class

php artisan make:composer MovieComposer

Register view composers Edit config (config/viewcomposers.php)

use App\ViewComposers\MovieComposer;

return [
    MovieComposer::class => [
      'view1','view2'
    ],
];

see document here for how to use View Composers

Customize Stubs

php artisan vendor:publish --provider="Limewell\LaravelMakeExtender\LaravelMakeExtenderServiceProvider" --tag="stubs"

This will export stubs into /stubs/vendor/laravel-make-extender for customization

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

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].