Answers for "laravel 8 model any table"

PHP
4

laravel model tablename

protected $table = 'DomainRelatedSettings';
Posted by: Guest on January-07-2021
0

Laravel model use specific table

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Flight extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'my_flights';
}
Posted by: Guest on October-08-2020

Browse Popular Code Answers by Language