app/Http/Controllers/API/VotuongController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index($nhanvat_id)
    {
        $nhanvat = Nhanvat::find($nhanvat_id);
        return $nhanvat->votuongs();
    }
public function index ( $ nhanvat_id ) { $ nhanvat = Nhanvat :: find ( $ nhanvat_id ) ; return $ nhanvat -> votuongs ( ) ; }
Display a listing of the resource.
Display a listing of the resource .