I create a MySQL database in Laravel using make:createdatabase special command and I create tables in this database but I can't find the database in my project (its path).
-
your database should be il your mysql env.. and this depend on your OS ...ScaisEdge– ScaisEdge2021-03-21 17:49:10 +00:00Commented Mar 21, 2021 at 17:49
-
If you didn't create any migration then I am afraid there is no relative path to your database. But you can find your database related configuration in .env or config/database.php file.ANIK ISLAM SHOJIB– ANIK ISLAM SHOJIB2021-03-21 17:52:45 +00:00Commented Mar 21, 2021 at 17:52
-
@scaisEdge i see it in env i need to open it to see the tables and data inside itLubna Al Anis– Lubna Al Anis2021-03-21 19:54:39 +00:00Commented Mar 21, 2021 at 19:54
-
@anikislamshojib i created migrations i just need to open it with MySQL to check dataLubna Al Anis– Lubna Al Anis2021-03-21 19:56:20 +00:00Commented Mar 21, 2021 at 19:56
-
1You can't open migration with mysql they are scripting files. You need some sort of client like sqlyug or workbenchANIK ISLAM SHOJIB– ANIK ISLAM SHOJIB2021-03-22 04:04:25 +00:00Commented Mar 22, 2021 at 4:04
1 Answer
as in https://laravel.com/docs/8.x/database
Configuration The configuration for Laravel's database services is located in your application's config/database.php configuration file. In this file, you may define all of your database connections, as well as specify which connection should be used by default. Most of the configuration options within this file are driven by the values of your application's environment variables. Examples for most of Laravel's supported database systems are provided in this file.
Laravel makes it very easy to manage your database connections through
app/config/database.php.
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),