1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-06-25 16:04:37 -05:00

Cleaned up migrations, full text search in model

Migrations were pretty much useless for database set up, so that needed
some attention to make setting up the project easier. Now, all necessary
tables can be created by running the `artisan migrate` command assuming
one has the database parameters set in the .env file

also added full text search capabilites through the database set up,
which the model itself can use to find locations, so the search has been
updated in the appropriate locations as well.

still need to add initial account set up and a form for adding sources
through the UI, but this was a big step towards letting anyone set up
their own version of tbs
This commit is contained in:
ro
2025-04-15 13:58:12 -06:00
parent 8fbf927f2d
commit 07793a413a
11 changed files with 181 additions and 127 deletions

View File

@ -23,7 +23,8 @@ class LocationRepository
$rawSearch = $terms;
$terms = str_replace(",", "", $terms);
$terms = str_replace(" ", "|", $terms);
$raw = DB::select("SELECT * FROM searchlocations(?)", [$terms]);
//$raw = DB::select("SELECT * FROM searchlocations(?)", [$terms]);
$raw = Location::search($terms)->get();
$results = [];
foreach ($raw as $item) {
if (($item->block_count + $item->silence_count) >= 2) {