• 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

How to create a individual template for page or post in custom plugin?

WAMP Virtual Host not working

What is the function of the (new Date()).getTime() in PHP?

How to properly set "0000-00-00 00:00:00" as a DateTime in PHP

Laravel UUID generation

Set quantity minimum, maximum and step at product level in Woocommerce

array_key_exists(): The first argument should be either a string or an integer

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

Make Calculator - When Button clicked the No shows in Textbox.

Eloquent insert id with sequence next value

Target class controller does not exist - Laravel 8

How to KeyBy where multiple items have the same key

Laravel Blade checkbox not checked

Laravel Multi-language routes without prefix

Issue with laravel eloquent model property

About Contact Privacy policy Terms and conditions