CrestApps / laravel-code-generator by CrestApps

An intelligent code generator for Laravel framework that will save you time! This awesome tool will help you generate resources like views, controllers, routes, migrations, languages and/or form-requests! It is extremely flexible and customizable to cover many on the use cases. It is shipped with cross-browsers compatible template, along with a client-side validation to modernize your application.
66,781
701
38
Package Data
Maintainer Username: CrestApps
Maintainer Contact: mike@crestapps.com (Majd Alhayek (Mike))
Package Create Date: 2016-12-31
Package Last Update: 2024-03-28
Home Page: https://laravel-code-generator.crestapps.com
Language: PHP
License: MIT
Last Refreshed: 2024-04-18 15:01:29
Package Statistics
Total Downloads: 66,781
Monthly Downloads: 732
Daily Downloads: 32
Total Stars: 701
Total Watchers: 38
Total Forks: 150
Total Open Issues: 32

Tweet

Introduction

An intelligent code generator for Laravel framework that will save you time! This awesome tool will help you generate resources like views, controllers, routes, migrations, languages and/or form-requests! It is extremely flexible and customizable to cover many use cases. It is shipped with a cross-browser compatible template, along with client-side validation to modernize your application.

For full documentation and live demo, please visit CrestApps.com

Features

Installation

  1. To download this package into your laravel project, use the command-line to execute the following command:

    composer require crestapps/laravel-code-generator --dev
    
  2. (You may skip this step when using Laravel >= 5.5) To bootstrap the packages into your project while using command-line only, open the app/Providers/AppServiceProvider.php file in your project. Then, add the following code to the register() method.

    Add the following line to bootstrap laravel-code-generator to the framework.

    if ($this->app->runningInConsole()) {
        $this->app->register('CrestApps\CodeGenerator\CodeGeneratorServiceProvider');
    }
    
  3. Execute the following command from the command-line to publish the package's config and the default template to start generating awesome code.

    php artisan vendor:publish --provider="CrestApps\CodeGenerator\CodeGeneratorServiceProvider" --tag=default
    

A layout is required for the default views! The code generator allows you to create a layout using the command-line. Of course, you can use also your own layout. You'll only need to include CSS bootstrap framework in your layout for the default templates to work properly. Additionally, you can chose to design your own templetes using a different framework or css.

Lessons

Checkout our channel on YouTube.com

  • https://youtu.be/l21qNcsMAWg
  • https://youtu.be/infoecfXOCw

Available Commands

The command in between the square brackets [] must be replaced with a variable of your choice.

Full documentation available at CrestApps.com.

Live demo is available at CrestApps.com.

Contribution

Do you like this project and want to contribute?

  • HELP WANTED Version v2.3 needs to be documented before it can be released. If you are able to contribute, please read the change-log in v2.3 branch and document it in the CrestApps-site repository. For any help, my email can be found in the composer.json file, feel free to send me an email.
  • Please start by Staring this package on GitHub.
  • Sharing this projects with others is your way of saying keep the improvements and new awesome features coming.
  • Report any bugs or send us any comments, idea, thought that you may have about this project as an issue on GitHub.

What did you create with this package?

I'd love to know if your site was generated using this package and list your logo on the documentation site. Please email me by using my contact info found in composer.json file.

Examples

The following example assumes that we are trying to create a CRUD called AssetCategory with the fields listed below.

  • id
  • name
  • description
  • is_active

Basic example - CRUD with migration

Basic example using translations for English and Arabic - with migration

Basic example with form-request

Basic example with soft-delete and migration

Creating resources from existing database

Creating resources from existing database with translation for English and Arabic

Creating resources from existing database with translation for English and Arabic in two step for better control over the fields!

Prologue

  • Release Notes
  • Upgrade Guide

License

"Laravel Code Generator" is an open-sourced software licensed under the MIT license