iescarro/lara

There is no license information available for the latest version (v0.0.14) of this package.

Simple Laravel Scaffold

v0.0.14 2024-09-05 10:48 UTC

This package is auto-updated.

Last update: 2024-11-05 11:09:13 UTC


README

Lara is a PHP console application designed to simplify the creation of scaffolding components in Laravel, inspired by the Rails generate command. Currently, it supports generating scaffold components.

Installation

To install Lara, you can use Composer. Add the package to your composer.json file or run the following command:

composer require iescarro/lara

Usage

Lara can be used to generate scaffold components in your Laravel application. The basic syntax for generating a scaffold is:

php vendor/iescarro/lara/lara generate scaffold <ModelName> <field1:type> <field2:type> ...

Example

To generate a scaffold for a Post model with title as a string and content as text, you would run the following command:

php vendor/iescarro/lara/lara generate scaffold Post title:string content:text

This command will generate the necessary files and code for the Post model, including:

  • Migration
  • Model
  • Controller
  • Request
  • Routes
  • Views

Generated Components

  • Migration: A new migration file for the model with the specified fields.
  • Model: A new Eloquent model file.
  • Controller: A new resource controller for the model.
  • Request: A new form request validation class.
  • Routes: Updates to the web.php file with the necessary routes.
  • Views: Basic views for creating, updating, and listing the model.

Contributing

We welcome contributions to improve Lara. If you would like to contribute, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

For any questions or support, please open an issue on GitHub or contact us.