Giter VIP home page Giter VIP logo

laravel-make-trait's Introduction

Laravel Make Trait!

You can find an English version from material at the end of the document.

Pré Requisitos

Os procedimentos desse recurso estão homologados para a versão ˆ5.6.33 do Laravel Framework. Quando for efetuar a instalação, certifique-se da versão do seu sistema e se ele está de acordo com o esperado!

Instalação

Essa lib está disponível no packgist e deve ser instalada via composer.

  • Importante: Verifique se não há a necessidade de forçar determinada versão.
composer require upinside/laravel-make-trait

Finalizado o processo de instalação, é necessário adicionar a seguinte entrada ao vetor de providers do Laravel.

Esse arquivo está localizado em config/app.php (na versão 5.6.33).

'providers' => [
    ...
    
    /*
     * Package Service Providers...
     */
    UpInside\LaravelMakeTrait\MakeTraitServiceProvider::class,
    
    ...
];

Com esse procedimento feito, você pode acessar o Terminal do seu sistema operacional ou da sua IDE e executar o comando list do artisan.

php artisan list

Se tudo ocorrer como previsto, você será uma saída com o comando listado:

...
make:test            Create a new test class
make:trait           Create a new trait
...

Uso

Agora para trabalhar com as Traits usando o comando artisan, basta invocar da seguinte forma:

php artisan make:trait Test

Isso fará com que seja criado um novo arquivo em app/Traits/Test.php com o seguinte conteúdo:

<?php

namespace App\Traits;

trait Test
{
    //
}

Contribuição

Deseja enviar um correções? Só efetuar um pull-request deste repositório e efetuar a alteração dentro de uma nova branch (que não seja a master).

Crie uma branch com seu nome (gustavo-web) com as correções para que seja aprovada. Maiores informações, você pode ter através de [email protected].

@guhweb que mantém esse projeto rodando!

English Version

Requirements

The procedures for this feature are approved for version 5.6.33 of the Laravel Framework. When you are installing, make sure your system version is up and running as expected!

Installation

This lib is available in the packgist and must be installed via composer.

  • Important: Make sure there is no need to force a particular version.
composer require upinside/laravel-make-trait

Once the installation process has finished, you must add the following entry to the Laravel providers array.

This file is located in config/app.php (in version 5.6.33).

'providers' => [
    ...
    
    /*
     * Package Service Providers...
     */
    UpInside\LaravelMakeTrait\MakeTraitServiceProvider::class,
    
    ...
];

With this procedure done, you can access the Terminal/Shell of your operating system or your IDE and execute the list command of the artisan.

php artisan list

If everything happens as expected, you will be output with the listed command:

...
make:test            Create a new test class
make:trait           Create a new trait
...

Use

Now to work with Traits using the artisan command, just invoke as follows:

php artisan make:trait Test

This will cause a new file to be created in app/Traits/Test.php with the following content:

<?php

namespace App\Traits;

trait Test
{
    //
}

Contribution

Do you want to submit a correction? Just do a pull-request from this repository and make the change inside a new branch (other than the master).

Create a branch with your name (gustavo-web) with the corrections for it to be approved. More information, you can have through [email protected].

@guhweb that keeps this project running!

laravel-make-trait's People

Stargazers

Fernando Silva avatar Aderbal Nunes avatar José Silva Jr. avatar

Watchers

James Cloos avatar Robson V. Leite avatar

Forkers

jsilva74

laravel-make-trait's Issues

Não funciona no PHP 8

A ideia é genial e de grande ajuda, porém o Composer não consegue instalar por problemas de compatibilidade com o PHP 8 :')

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.