[Vuejs]-On get request why do I get back the blade view, when I should get data from the database instead?

0👍

I think this ProjectRequest::where('client_id', $clientId)->value('name'); giving exception.

Either you check your laravel.log inside storage/logs folder or change that method into

    // Not working on eloquent model
    $valueOject = ProjectRequest::where('client_id',$clientId)->value('name');

    // DB facade its working. Change to this method
    $valueOject = DB::table('{your_table}')->where('client_id', $clientId)->value('name');

    dd($valueOject);

Leave a comment