PHP Classes

How to Use a Laravel Generator Command to Generate Files to Build PHP Applications Faster Laravel Make Extender: Generate files to use in Laravel applications

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-08-21 (18 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 9 This week: 8All time: 11,404 This week: 6Up
Version License PHP version Categories
laravel-make-extende 1.0.0Custom (specified...7Libraries, Project Management, Code G..., P...
Description 

Authors

Dipesh Sukhia
Bhavin Gajjar


Contributor

This package can generate files to use in Laravel applications.

It provides a Laravel service class that registers several commands that can be executed from the command line console using the Artisan to generate several types of files.

Currently, it can generate files based on a model from:

- Custom Helpers classes,

- Service classes

- Traits

- Builder scope classes

- Custom casts

- View Composers

- Collections Macros

Innovation Award
PHP Programming Innovation award nominee
August 2024
Nominee
Vote
Laravel is a popular PHP framework that provides a means to help developers create applications that follow similar patterns quickly.

It provides a file generation maker tool that can be used to generate several types of files using the Artisan tool from the command line console.

This package takes advantage of the possibility of the Laravel framework to generate several types of files that are useful for building PHP applications faster.

Manuel Lemos
Picture of Bhavin Gajjar
  Performance   Level  
Name: Bhavin Gajjar <contact>
Classes: 3 packages by
Country: India India
Innovation award
Innovation award
Nominee: 2x

Documentation

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.


  Files folder image Files (26)  
File Role Description
Files folder image.github (1 file)
Files folder imageconfig (2 files)
Files folder imagesrc (1 file, 1 directory)
Files folder imagestubs (9 files)
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (26)  /  .github  
File Role Description
  Accessible without login Plain text file FUNDING.yml Data Auxiliary data

  Files folder image Files (26)  /  config  
File Role Description
  Accessible without login Plain text file config.php Aux. Configuration script
  Accessible without login Plain text file viewcomposers.php Aux. Configuration script

  Files folder image Files (26)  /  src  
File Role Description
Files folder imageConsole (1 directory)
  Plain text file LaravelMakeExtenderServiceProvider.php Class Class source

  Files folder image Files (26)  /  src  /  Console  
File Role Description
Files folder imageCommands (7 files)

  Files folder image Files (26)  /  src  /  Console  /  Commands  
File Role Description
  Plain text file MakeCastCommand.php Class Class source
  Plain text file MakeHelperCommand.php Class Class source
  Plain text file MakeMacroCommand.php Class Class source
  Plain text file MakeScopeCommand.php Class Class source
  Plain text file MakeServiceCommand.php Class Class source
  Plain text file MakeTraitCommand.php Class Class source
  Plain text file MakeViewComposerCommand.php Class Class source

  Files folder image Files (26)  /  stubs  
File Role Description
  Plain text file cast.stub Class Class source
  Accessible without login Plain text file helper.stub Data Auxiliary data
  Accessible without login Plain text file macro.stub Example Example script
  Plain text file scope.stub Class Class source
  Plain text file service.invokable.stub Class Class source
  Plain text file service.stub Class Class source
  Plain text file trait.bootable.stub Class Class source
  Plain text file trait.stub Class Class source
  Plain text file viewcomposer.stub Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:9
This week:8
All time:11,404
This week:6Up