• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Is it possible to change the table name in the migration file-laravel

phplaravellaravel-5


PHP Snippet 1:

protected $table = 'todoapps';

PHP Snippet 2:

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Flight extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'my_flights';
}

Related Snippets

Laravel MSSQL Server Connection not working

SQL AVG() to 2 decimals

api response laravel doesn't show

how to fix Service provider class not found when using repository?

How to test laravel controller method?

Elasticsearch - Want to sort by field in all indices where that particular field available or not if not then avoid it

Display a product custom field only in WooCommerce Admin single orders

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

Woocommerce Checkout - Add conditional field required if one field is filled

Maatwebsite Excel 3.1 : how do I skip duplicate data when imported?

browsersync doesn't work with XAMPP

Parameter is not sent to Laravel route in Ajax

How to Install Composer Require doctrine/dbal

Display Link Title Instead of URL in XSL

Laravel database insert with combining array and string

About Contact Privacy policy Terms and conditions