Coder Social home page Coder Social logo

command-view's Introduction

Commands create model, view and controller

โ›ตviro-crud is laravel commands which can help you build view, model, and controller files in line command.

Installation

composer require viro/crud

Usage

Creating views

# Create a view 'index.blade.php' in the default directory
$ php artisan crud:view index

# Create a view 'index.blade.php' in a subdirectory ('pages')
$ php artisan crud:view index --path=pages

# Create a view resources 'index, create, edit, show' in a subdirectory ('pages')
$ php artisan crud:view index --path=pages --resource

# Create a view 'index.blade.php' with extends ('layouts.main') in the default is 'layouts.app'
$ php artisan crud:view index --extends=layouts.main

# Create a view 'index.blade.php' with section ('footer') in the default is 'content'
$ php artisan crud:view index --section=footer

Creating model

# Create a model 'Post'
$ php artisan crud:model Post

# Create a model 'Post' with name table db 'products'
$ php artisan crud:model Post --table=products

# Create a model 'Post' and view 'products'
$ php artisan crud:model Post -w --viewname=products

# Create a model 'Post' with view 'products'
$ php artisan crud:model Post -w --viewname=products

# Create a model 'Post' with view 'products' and in a subdirectory 'products'
$ php artisan crud:model Post -w --viewname=products --path=products

# Create a model 'Post' and controller
$ php artisan crud:model Post -c

# Create a model 'Post', controller and view (index.blade.php)
$ php artisan crud:model Post -cw

# Create a model 'Post', controller and view resources (index, create, edit, show)
$ php artisan crud:model Post -cW

# Create a model 'Post', controller resources and view resources (index, create, edit, show)
$ php artisan crud:model Post -r

# Create a model 'Post', controller resources, view resources (index, create, edit, show) and Requests
$ php artisan crud:model Post -rR

# Create a model 'Post', controller resources, view resources (index, create, edit, show) in a subdirectory 'products' and Requests
$ php artisan crud:model Post -rR --path=products

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.