Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Laravel without a database

Tags:

I was wondering if the use of a database is necessary on Laravel or I can build an app without database.

I have researched throughout but there is no clear indication of these nor on the Laravel documentation website or other places, it is just vague.

Thanks

like image 906
Gabs Avatar asked May 03 '16 10:05

Gabs


People also ask

Does Laravel have database?

Currently Laravel supports four database systems: MySQL, Postgres, SQLite, and SQL Server.

Which way does Laravel use to get data from database?

After configuring the database, we can retrieve the records using the DB facade with select method. The syntax of select method is as shown in the following table. Run a select statement against the database.

How do I know if Laravel is connected to database?

Echo the Laravel database name in Blade/PHP This will output the name of the database or return 'none' if there is no connection. If you view it in the browser, it gives you the name of the connected database. Checking whether the application is connected to a Laravel database.


1 Answers

Of course you can use Laravel without a database. You can read and save data using remote RESTful API, files etc or you can do not use any data layer at all. Laravel will work just fine.

Also, you can use pretty cool SQLite library which allows you to save all info to a single file. Laravel supports it out of box.

like image 94
Alexey Mezenin Avatar answered Oct 11 '22 16:10

Alexey Mezenin