Chris
6 years ago
11 changed files with 123 additions and 44 deletions
@ -0,0 +1,26 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Http\Controllers\Controller; |
||||
|
use App\Search; |
||||
|
|
||||
|
class SearchController extends Controller |
||||
|
{ |
||||
|
public function index(Request $request) |
||||
|
{ |
||||
|
$requestprovider = $request->input('provider'); |
||||
|
$query = $request->input('q'); |
||||
|
|
||||
|
$provider = Search::providerDetails($requestprovider); |
||||
|
|
||||
|
if($provider->type == 'external') { |
||||
|
return redirect($provider->url.'?'.$provider->var.'='.urlencode($query)); |
||||
|
} else { |
||||
|
// get results |
||||
|
} |
||||
|
|
||||
|
//print_r($provider); |
||||
|
} |
||||
|
} |
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@ |
|||||
{ |
{ |
||||
"/css/app.css": "/css/app.css?id=d346be37404d0fda1d66", |
"/css/app.css": "/css/app.css?id=550061ee14223568c451", |
||||
"/js/app.js": "/js/app.js?id=0db2e72b5cd42d83e306" |
"/js/app.js": "/js/app.js?id=0db2e72b5cd42d83e306" |
||||
} |
} |
||||
|
@ -1 +1 @@ |
|||||
{!! App\Setting::search() !!} |
{!! App\Search::form() !!} |
||||
|
Loading…
Reference in new issue