0

i set the prefix in config/database and also in .env and as well in phpmyadmin but when i access my localhost it shows messages that xyz ,abc,(tables name) doesn't exsits

Arsl
  • 11
  • 3
  • 1
    Possible duplicate of [How to use global prefix for tables in Laravel 5](https://stackoverflow.com/questions/37559209/how-to-use-global-prefix-for-tables-in-laravel-5) – Don't Panic Feb 13 '19 at 09:41
  • This is an identical [copy of a question on laracasts.com from 2016](https://laracasts.com/discuss/channels/laravel/using-table-prefixes-in-laravel) - do the answers there not help? How about [this one here on SO](https://stackoverflow.com/questions/37559209/how-to-use-global-prefix-for-tables-in-laravel-5)? – Don't Panic Feb 13 '19 at 09:46
  • yes i find it at laracast but did'not work in my case – Arsl Feb 13 '19 at 09:49
  • What does `did not work` mean? Describe what you did, describe your problem, show us your code, show us your errors ... You will get a better response here if you read the [how to ask](https://stackoverflow.com/questions/how-to-ask) guide, and edit your question accordingly. – Don't Panic Feb 13 '19 at 09:51

2 Answers2

0

You would have to configure the table name in the model as described here

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

You can setup table prefix in config/database.php,

'prefix' => 'myprefix',