Now, that we have properties in our database, let's start building the search.

Goals of This Lesson
- Create API endpoint (Route + Controller) for searching the properties by city, country, or geographical object
- Write PHPUnit tests for all those cases
By the end of this lesson, we will see these tests passing in Terminal:

Creating Controller and Route
In later lessons, we will have more parameters for the search, but we have to start somewhere. So, for starters, we will try these criteria:
- By city
- By country
- Close to a geographical object (by its latitude/longitude)
Let's build the controller and method for this...
hi, it seems mysqlite doesn't support acos function because of this error "General error: 1 no such function: acos... "
I have to switch to mysql db to pass the test case
I performed my
php artisan teston SQLite specifically and it worked for me for some reason.Hi, i got the same error that Huy got thesame error while runing the test "General error: 1 no such function: acos... ", what are the alternatives
I've googled and I think this StackOverflow may help: acos function in Sqlite
But also, I found this? So maybe it depends on the version of SQLite?
I had the same problem in local machine with sqlite (it doesn't recognize acos trigonometric function)!, i use laragon with Windows, but the tests run successfully in Github Actions on push.
Any fix for this ? Im using mysql version 8.0.30 got the same error.