Your IP : 13.59.1.58


Current Path : /home/lentoinv/api.lentoria.com/app/Http/Controllers/
Upload File :
Current File : /home/lentoinv/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);
    }
}

?>