wbe/searchland

There is no license information available for the latest version (0.0.6) of this package.

Live Search

Installs: 48

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:package

0.0.6 2018-01-30 09:33 UTC

This package is not auto-updated.

Last update: 2024-03-24 12:05:05 UTC


README

Install in Laravel 5.5

add to config/app.php

 'providers' => [
        Wbe\Searchland\SearchlandServiceProvider::class,

DO

php artisan vendor:publish --provider="Wbe\Searchland\SearchlandServiceProvider"

add to blade in script section

@include('searchland::search.titleSearch')

add to search input class "searchGlobal"

after input add it's opened list

<div class="dropdown dropdown-lg">
    <div class="dropdown-menu dropdown-menu-right resultlist" role="menu" id="searchbox">
    </div>
</div>

if you whant customize opened list create in views folder search with blade template.blade.php

config/search

count - max count row in popup search urlname - fild where is link on page datacol - default data column

create file config/search_tables

Example search_tables file

   "news"=>[
        "columns"=>["title",
            "description",
            "alias"
        ],
        "join"=>["news_description"=>[
            "news_description.content_id",
            "news.id"
        ]
        ],
        "link"=>[
            "url_add"=>"/news/",
            "column"=>"alias"
        ]
    ],
"table_name"=>[
    "columns"=>["first_column","second_column","thread_column","link_column"],
    "join"=>["table_what_need_to_join"=>["what","to_what"]], - if needed
    "link"=>["url_add"=>"if need echo on start link","column"=>"what_column_is_link"]

if you have two or more tables and columns did'n have the same count search columns will result be used name where is max count of columns for example

"table_1"=>["1","2","3"]
"table_2"=>["a","b","c","d"]

result has been

"a" "b" "c" "d"
table 1 row result "1" "2" "3" null
table 2 row result "a" "b" "c" "d"

need install bootstrap

	composer require twbs/bootstrap