Your IP : 18.224.44.207


Current Path : /home/lentoinv/test.api.lentoria.com/app/Http/Controllers/
Upload File :
Current File : /home/lentoinv/test.api.lentoria.com/app/Http/Controllers/SearchController.php

<?php

namespace App\Http\Controllers;
    
use App\Models\Course;
use Illuminate\Http\Request;

class SearchController extends Controller
{
    function searchCourses(Request $request){
      $course = Course::where('title','LIKE',"%".$request->search."%")->orWhere('description','LIKE',"%".$request->search."%")->get();

      return response(['data' => $course],200);
    }
}

?>