Using php Artisan make:Repository

Asked

Viewed 514 times

3

Hi, I’d like to ask you a question. I’m using the remote:

php artisan make:repository ProjectNote

And I would like to know how do I make the command understand that I want my migrate to have the name

create_table_project_notes

And consequently my table has the name

project_notes

Someone could give me a light?

  • I don’t know much about Artesian, but from what little I read in the documentation I think it would be php artisan make:migration NOME_DO_MIGRATION --table=NOME_DA_TABELA

  • @Guilhermenascimento, I think he’s gonna have to use a library that does that in the Laravel. By default, it only creates the class skeleton, does not insert features such as table names and the like

  • Are you using this package? https://github.com/andersao/laravel-repository

1 answer

3

Anderson command this correct.
php artisan make:repository ProjectNote, with this command you will get the result below.

Migration
2016_07_10_225826_create_project_notes_table.php

public function up()
    {
        Schema::create('project_notes', function(Blueprint $table) {
            $table->increments('id');

            $table->timestamps();
        });
    }
    

Browser other questions tagged

You are not signed in. Login or sign up in order to post.