没有数据库连接的Laravel [英] Laravel without database connection

查看:157
本文介绍了没有数据库连接的Laravel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在没有数据库连接的情况下使用Laravel吗?我打算使用Blade和VueJS创建一个前端网站,该网站将使用第三方API,并且不需要数据库.

is there a way to use Laravel without database connection? I am planning to create a frontend website using blade and VueJS that will consume third-party API and I don't need a database.

当前,我收到此错误,并且不确定如何绕过它.

Currently, I am getting this error and I am not sure how to bypass it.

Database name seems incorrect
You're using the default database name laravel. This database does not exist.

Edit the .env file and use the correct database name in the DB_DATABASE key

推荐答案

如果您将内部工匠服务用于开发服务器,则需要重新启动服务:

if you using internal artisan service for development server, you need to restart service:

Ctrl + c

然后运行

php artisan serve

这篇关于没有数据库连接的Laravel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆