How to get the path to the database directory in laravel
How to get the path to the database directory in laravel
Loading...
1 Answer
You can use the database_path()
helper function to get the path to the database directory in laravel
For Laravel developers, The database directory contains all your DB migrations, model factories, and seeds.you can also use it to hold an SQLite database.
If you want to get the path to the database directory in laravel you can use the database_path()
helper function which will return a string
Example of how to use database_path()
helper function
$path = database_path();
Output (output difference based on your project)
"C:\xampp\htdocs\laravel\shop\database"
answer Link