<?php
namespace App\Http\Controllers;
use DB;
use Illuminate\Http\Request;
class SearchController extends Controller
{
public function search(Request $request) {
$text = $request->input('text');
$patients = DB::table('patients')
->where('firstname', 'Like', $text)
->get();
// return the results
return response()->json($patients);
}
}
答案 0 :(得分:0)
以这种方式输入您的退货!
import component_exported_as_default, {component_1,component2} from 'components/my_component.js'
function App(){
return(
<div className="APP">
<component_exported_as_default>
<component_1>
<component2>
</div>
)
}
答案 1 :(得分:0)
$filter = $request->tagname;
$events = Event::where([
['status', '=', 1],
['search_tags','LIKE',"%{$filter}%"]
])->get();
return response($events);