All Projects → orchestral → canvas

orchestral / canvas

Licence: MIT license
Code Generators for Laravel Applications and Packages

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to canvas

artisan-remote
Artisan Remote is a package for Laravel to interact with your Artisan Commands via an HTTP API.
Stars: ✭ 69 (-50.36%)
Mutual labels:  laravel-package
laravel-package
Laravel package template
Stars: ✭ 31 (-77.7%)
Mutual labels:  laravel-package
query-filter
Define filters for your Eloquent models based on your request
Stars: ✭ 20 (-85.61%)
Mutual labels:  laravel-package
awesome-landlord
A simple, single database multi-tenancy solution for Laravel 5.2+
Stars: ✭ 41 (-70.5%)
Mutual labels:  laravel-package
correios-consulta
Buscar informações de serviços dos correios diretamente nos sites deles, sem utilizar api de terceiros.
Stars: ✭ 155 (+11.51%)
Mutual labels:  laravel-package
laravel-php-k8s
Just a simple port of renoki-co/php-k8s for easier access in Laravel
Stars: ✭ 71 (-48.92%)
Mutual labels:  laravel-package
laravel-getid3
A Laravel package to extract metadata from media files. mp3, aac, etc. It can be used with files stored on different disks such as local disk, S3 etc.
Stars: ✭ 50 (-64.03%)
Mutual labels:  laravel-package
response
Response HTTP package for Simfony, Laravel, Lumen and PHP 7 with standard REST API
Stars: ✭ 14 (-89.93%)
Mutual labels:  laravel-package
Laravel-Crud-Generator
A Simple Laravel Library that allows to create crud operation with a single command
Stars: ✭ 20 (-85.61%)
Mutual labels:  laravel-package
eloquent-repository
Repository pattern for Eloquent ORM with focus in cache.
Stars: ✭ 30 (-78.42%)
Mutual labels:  laravel-package
translate-laravel
Translate your Laravel website easily.
Stars: ✭ 36 (-74.1%)
Mutual labels:  laravel-package
super-basic-auth
🔒 A lightweight package to add basic authentication to your Laravel app.
Stars: ✭ 22 (-84.17%)
Mutual labels:  laravel-package
qqmap-region
腾讯位置服务中国标准行政区划数据 SDK
Stars: ✭ 22 (-84.17%)
Mutual labels:  laravel-package
laravel-login-links
Create (passwordless) login links for users
Stars: ✭ 13 (-90.65%)
Mutual labels:  laravel-package
tall-toasts
A Toast notification library for the Laravel TALL stack. You can push notifications from the backend or frontend to render customizable toasts with almost zero footprint on the published CSS/JS 🔥🚀
Stars: ✭ 296 (+112.95%)
Mutual labels:  laravel-package
menus
Laravel Enso main menu manager, for easy management of the application menus straight from the interface, whether that means adding, removing or reordering them
Stars: ✭ 15 (-89.21%)
Mutual labels:  laravel-package
laravel-json-api
Integrate JSON:API resources on Laravel
Stars: ✭ 17 (-87.77%)
Mutual labels:  laravel-package
laravel-crm
Free & Opensource Laravel CRM solution for SMEs and Enterprises for complete customer lifecycle management.
Stars: ✭ 927 (+566.91%)
Mutual labels:  laravel-package
laravel-error-handler
Laravel 5.2/5.3 package for better exception handling.
Stars: ✭ 15 (-89.21%)
Mutual labels:  laravel-package
laravel-twig
Twig for Laravel Framework
Stars: ✭ 16 (-88.49%)
Mutual labels:  laravel-package

Code Generators for Laravel Applications and Packages

Canvas replicates all of the make artisan commands available in your basic Laravel application. It allows everyone to use it:

  • outside of Laravel installation such as when building Laravel packages.
  • with Laravel by allowing few customization to the stub resolved class and namespace.

tests Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status

Installation

To install through composer, run the following command from terminal:

composer require --dev "orchestra/canvas"

Usages

As a Laravel developer, you should be familiar with the following commands:

Command. Description
make:channel Create a new channel class
make:command Create a new Artisan command
make:controller Create a new controller class
make:event Create a new event class
make:exception Create a new custom exception class
make:factory Create a new model factory
make:job Create a new job class
make:listener Create a new event listener class
make:mail Create a new email class
make:middleware Create a new middleware class
make:migration Create a new migration file
make:model Create a new Eloquent model class
make:notification Create a new notification class
make:observer Create a new observer class
make:policy Create a new policy class
make:provider Create a new service provider class
make:request Create a new form request class
make:resource Create a new resource
make:rule Create a new validation rule
make:seeder Create a new seeder class
make:test Create a new test class

Which can be execute via:

php artisan make:migration CreatePostsTable --create

With Canvas, you can run the equivalent command via:

composer exec canvas make:migration CreatePostsTable --create

canvas.yaml Preset file

To get started you can first create canvas.yaml in the root directory of your Laravel project or package.

Laravel preset

You can run the following command to create the file:

composer exec canvas preset laravel

Which will output the following as canvas.yaml:

preset: laravel

namespace: App

model:
  namespace: App

Package preset

You can run the following command to create the file:

composer exec canvas preset package

Which will output the following as canvas.yaml:

preset: package

namespace: PackageName
user-auth-provider: App\User

paths:
  src: src
  resource: resources

factory:
  path: database/factories

migration:
  path: database/migrations
  prefix: ''

console:
  namespace: PackageName\Console

model:
  namespace: PackageName

provider:
  namespace: PackageName

testing:
  namespace: PackageName\Tests

You need to change PackageName to the root namespace for your package.

Alternatively, you can set --namespace option to ensure the namespace is used in the file:

./vendor/bin/canvas preset package --namespace="Foo\Bar"
preset: package

namespace: Foo\Bar
user-auth-provider: App\User

paths:
  src: src
  resource: resources

factory:
  path: database/factories

migration:
  path: database/migrations
  prefix: ''

console:
  namespace: Foo\Bar\Console

model:
  namespace: Foo\Bar
  
provider:
  namespace: Foo\Bar

testing:
  namespace: Foo\Bar\Tests

Integration with Laravel

By default, you can always use composer exec canvas for Laravel and Packages environment. However, with the Package Discovery Orchestra\Canvas\LaravelServiceProvider will be installed automatically and override all default make command available via artisan so you can use it without changing anything.

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