nginxsonarrradarrplexorganizrdashboardbookmarkapplication-dashboardmuximuxlandingpagestartpagelandinghtpcserverhomepagesabnzbdheimdallembycouchpotatonzbget
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
600 B
27 lines
600 B
6 years ago
|
<?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);
|
||
|
}
|
||
|
}
|