Laravel without database connection

后端 未结 5 842
渐次进展
渐次进展 2020-12-31 18:42

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 ne

5条回答
  •  无人及你
    2020-12-31 19:40

    If you are using Homestead as your development environment, you should change DB_DATABASE from laravel to homestead, DB_USERNAME to homestead and DB_PASSWORD to secret.

    A homestead database is configured for both MySQL and PostgreSQL out of the box. To connect to your MySQL or PostgreSQL database from your host machine's database client, you should connect to 127.0.0.1 and port 33060 (MySQL) or 54320 (PostgreSQL). The username and password for both databases is homestead / secret.

    https://laravel.com/docs/7.x/homestead#connecting-to-databases

提交回复
热议问题